Skip to content

Commit

Permalink
"command" option to spawn() with, defaults to "node"
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Dec 22, 2010
1 parent 6feedc1 commit 02de53f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/forever.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ var Forever = function (file, options) {
options.options.unshift(file);
options.silent = options.silent || false;
options.forever = options.forever || false;
options.command = options.command || 'node';

// If we should log stdout, open a file buffer
if (options.outFile) {
Expand Down Expand Up @@ -353,7 +354,7 @@ Forever.prototype.start = function (restart) {
});
}

var child = spawn('node', this.options.options);
var child = spawn(this.options.command, this.options.options);
this.child = child;
this.running = true;

Expand Down Expand Up @@ -494,4 +495,4 @@ Forever.prototype.stop = function () {
};

// Export the Forever object
forever.Forever = Forever;
forever.Forever = Forever;

0 comments on commit 02de53f

Please sign in to comment.