Skip to content

Commit

Permalink
[fix] Pass options.argv instead of options (cli.js, line 188)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfhbrook committed Feb 1, 2012
1 parent 5aa16c3 commit e154a50
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions lib/forever/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,24 @@ var help = [

var app = flatiron.app;

var argvOptions = cli.argvOptions = {
'command': {alias: 'c'},
'errFile': {alias: 'e'},
'logFile': {alias: 'l'},
'appendLog': {alias: ['a', 'append'], boolean: true},
'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},
'debug': {alias: 'd', boolean: true},
'plain': {boolean: true}
};

app.use(flatiron.plugins.cli, {
argv: argvOptions,
usage: help
});

Expand All @@ -90,22 +107,6 @@ var actions = [
'cleanlogs'
];

var argvOptions = cli.argvOptions = {
'command': {alias: 'c'},
'errFile': {alias: 'e'},
'logFile': {alias: 'l'},
'appendLog': {alias: ['a', 'append'], boolean: true},
'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},
'debug': {alias: 'd', boolean: true},
'plain': {boolean: true}
};

app.config.argv().env();

var reserved = ['root', 'pidPath'];
Expand Down Expand Up @@ -185,7 +186,8 @@ var getOptions = cli.getOptions = function (file) {
// we've removed some before.
//
app.config.stores.argv.store = {};
app.config.use('argv', argvOptions);

app.config.use('argv', { argv: argvOptions });

[
'pidFile', 'logFile', 'errFile', 'watch', 'minUptime', 'appendLog',
Expand Down

0 comments on commit e154a50

Please sign in to comment.