mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
cli ux: when command is errored do not display process list to avoid confusion
This commit is contained in:
parent
37b9de7811
commit
24026750a9
@ -1373,7 +1373,7 @@ class API {
|
||||
that.Client.executeRemote(action_name, opts, function(err, res) {
|
||||
if (err) {
|
||||
Common.printError(conf.PREFIX_MSG_ERR + 'Process %s not found', id);
|
||||
return next('Process not found');
|
||||
return next(`Process ${id} not found`);
|
||||
}
|
||||
|
||||
if (action_name == 'restartProcessId') {
|
||||
@ -1658,6 +1658,9 @@ class API {
|
||||
var that = this;
|
||||
var systemdata = null
|
||||
|
||||
if (code != 0 && code != null) {
|
||||
return that.exitCli(code ? code : conf.SUCCESS_EXIT);
|
||||
}
|
||||
// Do nothing if PM2 called programmatically and not called from CLI (also in exitCli)
|
||||
if (conf.PM2_PROGRAMMATIC && process.env.PM2_USAGE != 'CLI') return false;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user