Skip to content

Commit

Permalink
[bin dist] Version bump. Small fixes from 0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Nov 16, 2010
1 parent faacc0f commit 2bcc53d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
17 changes: 14 additions & 3 deletions bin/forever
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ var mappings = {
'e': 'errfile'
};

// Show help prompt if requested
if (argv.h || argv.help) {
// Show help prompt if requested or if the
// incorrect usage options are supplied
if (argv.h || argv.help || Object.keys(argv).length === 2
|| argv._.length === 0) {
sys.puts(help);
return;
}
Expand All @@ -70,7 +72,16 @@ var file = argv._[0];

// Setup pass-thru options for child-process
var options = {};
options.options = process.argv.splice(process.argv.indexOf(file) + 1);
options.options = process.argv.splice(process.argv.indexOf(file)).splice(1);

// Now that we've removed the target script options
// reparse the options and setup the forever settings
argv = require('optimist').argv;
Object.keys(argv).forEach(function (key) {
if (mappings[key]) {
options[mappings[key]] = argv[key];
}
});

// If max isn't specified set it to run forever
if (typeof options['max'] === 'undefined') {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "forever",
"description": "A simple CLI tool for ensuring that a given node script runs continuously (i.e. forever)",
"version": "0.2.5",
"version": "0.2.6",
"author": "Charlie Robbins <charlie.robbins@gmail.com>",
"contributors": [
{ "name": "Fedor Indutny", "email": "fedor.indutny@gmail.com" }
Expand All @@ -13,7 +13,7 @@
"keywords": ["cli", "fault tolerant", "sysadmin", "tools"],
"dependencies": {
"daemon": ">= 0.1.0",
"optimist": ">= 0.0.3",
"optimist": ">= 0.0.6",
"vows": ">= 0.5.1",
},
"bin": { "forever": "./bin/forever" },
Expand Down

0 comments on commit 2bcc53d

Please sign in to comment.