Skip to content

Commit

Permalink
Merge pull request #5269 from westhom/development
Browse files Browse the repository at this point in the history
fix: make tarball module uninstall cross-platform
  • Loading branch information
Unitech authored Jan 20, 2022
2 parents b02904a + f0e28ac commit 4db38ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/API/Modules/TAR.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ var Configuration = require('../../Configuration.js');
var cst = require('../../../constants.js');
var Common = require('../../Common');
var forEachLimit = require('async/forEachLimit');
const sexec = require('../../tools/sexec.js')
const sexec = require('../../tools/sexec.js');
const deleteFolderRecursive = require('../../tools/deleteFolderRecursive.js');

var path = require('path');
var fs = require('fs');
Expand Down Expand Up @@ -108,7 +109,7 @@ function installLocal(PM2, module_filepath, opts, cb) {

function deleteModulePath(module_name) {
var sanitized = module_name.replace(/\./g, '')
execSync(`rm -r ${path.join(cst.DEFAULT_MODULE_PATH, module_name)}`, { silent: true })
deleteFolderRecursive(path.join(cst.DEFAULT_MODULE_PATH, module_name));
}

function runInstall(PM2, target_path, module_name, opts, cb) {
Expand Down

0 comments on commit 4db38ea

Please sign in to comment.