Skip to content

Commit 080d124

Browse files
authored
Merge pull request #5906 from AYOKINYA/development
fix: Enable PM2 module update from tarball
2 parents d9e6964 + 194200a commit 080d124

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

lib/API/Modules/Modularizer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Modularizer.package = function(CLI, module_path, cb) {
8787
var fullpath = process.cwd()
8888
if (module_path)
8989
fullpath = require('path').resolve(module_path)
90-
TAR.package(fullpath, process.cwd(), cb)
90+
TAR.packager(fullpath, process.cwd(), cb)
9191
}
9292

9393
/**

lib/API/Modules/TAR.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ function packager(module_path, target_path, cb) {
283283

284284
var tar = exec(cmd, (err, sto, ste) => {
285285
if (err) {
286-
console.log(sto.toString().trim())
287-
console.log(ste.toString().trim())
286+
console.error(sto.toString().trim())
287+
console.error(ste.toString().trim())
288288
}
289289
})
290290

lib/binaries/CLI.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,11 @@ commander.command('install <module|git:// url>')
509509
});
510510

511511
commander.command('module:update <module|git:// url>')
512+
.option('--tarball', 'is local tarball')
512513
.description('update a module and run it forever')
513-
.action(function(plugin_name) {
514-
pm2.install(plugin_name);
514+
.action(function(plugin_name, opts) {
515+
require('util')._extend(commander, opts);
516+
pm2.install(plugin_name, commander);
515517
});
516518

517519

0 commit comments

Comments
 (0)