From 1a1ba32dcab559b7c716edf16534fc0481a58e46 Mon Sep 17 00:00:00 2001 From: indexzero Date: Sun, 21 Apr 2013 06:09:52 -0400 Subject: [PATCH] [fix] Make `-v|--version` work. Fixes #303. --- lib/forever.js | 2 -- lib/forever/cli.js | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/forever.js b/lib/forever.js index 4f6464d6..dddc3df8 100644 --- a/lib/forever.js +++ b/lib/forever.js @@ -55,8 +55,6 @@ forever.Forever = forever.Monitor = require('forever-monitor').Monitor; forever.Worker = require('./forever/worker').Worker; forever.cli = require('./forever/cli'); - - // // Expose version through `pkginfo` // diff --git a/lib/forever/cli.js b/lib/forever/cli.js index 23633a92..c4a00311 100644 --- a/lib/forever/cli.js +++ b/lib/forever/cli.js @@ -535,6 +535,10 @@ cli.run = function () { }; cli.start = function () { + if (app.argv.v || app.argv.version) { + return console.log('v' + forever.version); + } + // // Check for --no-colors/--colors and --plain option //