mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
fix deep update and avoid 0 as process name
This commit is contained in:
parent
6dc5a6a381
commit
86ea792b0e
@ -1254,7 +1254,7 @@ CLI._operate = function(action_name, process_name, envs, cb) {
|
||||
});
|
||||
} else {
|
||||
// Check if application name as number is an app name
|
||||
Common.getProcessIdByName(process_name, allow_module_restart, function(err, ids, full_detail) {
|
||||
Common.getProcessIdByName(process_name, function(err, ids, full_detail) {
|
||||
if (ids.length > 0)
|
||||
return processIds(ids, cb);
|
||||
// Else operate on pm id
|
||||
|
||||
@ -341,6 +341,9 @@ Common.getProcessIdByName = function(name, force_all, cb) {
|
||||
force_all = false;
|
||||
}
|
||||
|
||||
if (name == '0')
|
||||
return cb(null, []);
|
||||
|
||||
Satan.executeRemote('getMonitorData', {}, function(err, list) {
|
||||
if (err) {
|
||||
Common.printError('Error retrieving process list: ' + err);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user