From 1a04002f5eb5fb13169e3aea99047475080b82e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Ma=C5=82ecki?= Date: Mon, 21 Nov 2011 01:56:03 +0100 Subject: [PATCH] [fix] Make `--help` work --- lib/forever/cli.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/forever/cli.js b/lib/forever/cli.js index c3127413..75875d76 100644 --- a/lib/forever/cli.js +++ b/lib/forever/cli.js @@ -83,6 +83,7 @@ var argvOptions = { 'max': {alias: 'm'}, 'outFile': {alias: 'o'}, 'path': {alias: 'p'}, + 'help': {alias: 'h'}, 'silent': {alias: 's', boolean: true}, 'verbose': {alias: 'v', boolean: true}, 'watch': {alias: 'w', boolean: true}, @@ -452,6 +453,9 @@ app.cmd(/(.+)/, cli.start = function (file) { cli.startCLI = function () { app.init(function () { + if (app.config.get('help')) { + return util.puts(help.join('\n')); + } app.start(); }); };