try to change directory before spawning forever process

This commit is contained in:
Todd Treece 2015-08-17 18:53:16 -04:00
parent c58d4ac879
commit a9fb081848

6
cli
View file

@ -10,8 +10,9 @@ var spawn = require('child_process').spawn,
function start() {
process.chdir(path.normalize(__dirname));
var child = spawn('forever', ['start', '-c', 'node', 'index.js', '-s'], {
cwd: path.normalize(__dirname),
env: process.env,
detached: true
});
@ -25,8 +26,9 @@ function start() {
function stop() {
process.chdir(path.normalize(__dirname));
var child = spawn('forever', ['stop', '-c', 'node', 'index.js', '-s'], {
cwd: path.normalize(__dirname),
env: process.env,
detached: true
});