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

Function execCommands

lib/API/Version.js:274–292  ·  view source on GitHub ↗
(repo_path, command_list, cb)

Source from the content-addressed store, hash-verified

272 * @return
273 */
274 var execCommands = function(repo_path, command_list, cb) {
275 var stdout = '';
276
277 eachSeries(command_list, function(command, callback) {
278 stdout += '\n' + command;
279 exec('cd '+repo_path+';'+command,
280 function(code, output) {
281 stdout += '\n' + output;
282 if (code === 0)
283 callback();
284 else
285 callback('`'+command+'` failed');
286 });
287 }, function(err) {
288 if (err)
289 return cb(stdout + '\n' + err);
290 return cb(null, stdout);
291 });
292 }
293
294 /**
295 * Description Search process.json for post-update commands

Callers 1

Version.jsFile · 0.85

Calls 2

cbFunction · 0.85
execFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…