Skip to content
Browse files

[fix] Pass proc.spawnWith to `forever.restart`. Fixes #116

  • Loading branch information...
1 parent 39f8b5a commit 0d4f68e6e4c82a068da35fc9924428bff08de6bf @indexzero committed Oct 9, 2011
Showing with 8 additions and 1 deletion.
  1. +7 −0 examples/env-server.js
  2. +1 −1 lib/forever.js
View
7 examples/env-server.js
@@ -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);
View
2 lib/forever.js
@@ -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 () {

0 comments on commit 0d4f68e

Please sign in to comment.
Something went wrong with that request. Please try again.