Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Enable PM2 module update from tarball #5906

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/API/Modules/Modularizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Modularizer.package = function(CLI, module_path, cb) {
var fullpath = process.cwd()
if (module_path)
fullpath = require('path').resolve(module_path)
TAR.package(fullpath, process.cwd(), cb)
TAR.packager(fullpath, process.cwd(), cb)
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/API/Modules/TAR.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ function packager(module_path, target_path, cb) {

var tar = exec(cmd, (err, sto, ste) => {
if (err) {
console.log(sto.toString().trim())
console.log(ste.toString().trim())
console.error(sto.toString().trim())
console.error(ste.toString().trim())
}
})

Expand Down
6 changes: 4 additions & 2 deletions lib/binaries/CLI.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,11 @@ commander.command('install <module|git:// url>')
});

commander.command('module:update <module|git:// url>')
.option('--tarball', 'is local tarball')
.description('update a module and run it forever')
.action(function(plugin_name) {
pm2.install(plugin_name);
.action(function(plugin_name, opts) {
require('util')._extend(commander, opts);
pm2.install(plugin_name, commander);
});


Expand Down