From 055c4832481b66d1f32f85ceb1c5caa9a20e4782 Mon Sep 17 00:00:00 2001 From: indexzero Date: Sun, 21 Apr 2013 04:33:30 -0400 Subject: [PATCH] [fix] Warn users if `--minUptime` or `--spinSleepTime` are not specified. Fixes #344. --- lib/forever/cli.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/forever/cli.js b/lib/forever/cli.js index e7ca934f..be132075 100644 --- a/lib/forever/cli.js +++ b/lib/forever/cli.js @@ -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};