MCPcopy
hub / github.com/Unitech/pm2 / reoperate

Method reoperate

lib/API.js:1453–1463  ·  view source on GitHub ↗
(err, ids)

Source from the content-addressed store, hash-verified

1451 });
1452
1453 function reoperate(err, ids) {
1454 if (err) {
1455 Common.printError(err);
1456 return cb ? cb(Common.retErr(err)) : that.exitCli(conf.ERROR_EXIT);
1457 }
1458 if (!ids || ids.length === 0) {
1459 Common.printError(conf.PREFIX_MSG_WARNING + 'No process found');
1460 return cb ? cb(new Error('process name not found')) : that.exitCli(conf.ERROR_EXIT);
1461 }
1462 return processIds(ids, cb);
1463 }
1464 }
1465 // operate using regex
1466 else if (isNaN(process_name) && process_name[0] === '/' && process_name[process_name.length - 1] === '/') {

Callers

nothing calls this directly

Calls 3

cbFunction · 0.85
processIdsFunction · 0.85
exitCliMethod · 0.80

Tested by

no test coverage detected