Skip to content

Commit

Permalink
[fix] Pass proc.spawnWith to forever.restart. Fixes #116
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Oct 9, 2011
1 parent 39f8b5a commit 0d4f68e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions examples/env-server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var http = require('http');

http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'application/json' });
res.write(JSON.stringify(process.env));
res.end();
}).listen(8080);
2 changes: 1 addition & 1 deletion lib/forever.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ forever.restart = function (target, format) {
restartCommand.push(proc.file, proc.options.join(' '));
forever.log.silly('Restarting with options', { options: restartCommand.join(' ') });

exec(restartCommand.join(' '), function (err, stdout, stderr) {
exec(restartCommand.join(' '), proc.spawnWith, function (err, stdout, stderr) {
next();
});
}, function () {
Expand Down

0 comments on commit 0d4f68e

Please sign in to comment.