Skip to content

Commit

Permalink
process exit on error
Browse files Browse the repository at this point in the history
  • Loading branch information
noazark authored and indexzero committed Apr 21, 2013
1 parent b641a4a commit d3675fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/forever/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ app.cmd(/stop (.+)/, cli.stop = function (file) {

runner.on('error', function (err) {
forever.log.error('Forever cannot find process with index: ' + file);
process.exit(1);
});
});

Expand All @@ -295,6 +296,7 @@ app.cmd('stopall', cli.stopall = function () {

runner.on('error', function () {
forever.log.info('No forever processes running');
process.exit(1);
});
});

Expand Down Expand Up @@ -339,6 +341,7 @@ app.cmd(/restart (.+)/, cli.restart = function (file) {
runner.on('error', function (err) {
forever.log.error('Error restarting process: ' + file.grey);
forever.log.error(err.message);
process.exit(1);
});
});

Expand Down

0 comments on commit d3675fa

Please sign in to comment.