Skip to content

Commit

Permalink
[fix] Warn users if --minUptime or --spinSleepTime are not specif…
Browse files Browse the repository at this point in the history
…ied. Fixes #344.
  • Loading branch information
indexzero committed Apr 21, 2013
1 parent 1e4b2f6 commit 055c483
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/forever/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,19 @@ var getOptions = cli.getOptions = function (file) {
options[key] = app.config.get(key);
});

if (!options.minUptime) {
forever.log.warn('--minUptime not set. Defaulting to: 1000ms');
options.minUptime = 1000;
}

if (!options.spinSleepTime) {
forever.log.warn([
'--spinSleepTime not set. Your script',
'will exit if it does not stay up for',
'at least ' + options.minUptime + 'ms'
].join(' '));
}

options.sourceDir = options.sourceDir || (file && file[0] !== '/' ? process.cwd() : '/');
if (options.sourceDir) {
options.spawnWith = {cwd: options.sourceDir};
Expand Down

0 comments on commit 055c483

Please sign in to comment.