fix deep update and avoid 0 as process name

This commit is contained in:
--global 2016-02-15 12:17:00 +01:00
parent 6dc5a6a381
commit 86ea792b0e
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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);