diff --git a/lib/master/starter.js b/lib/master/starter.js index f23bc3647..baa944571 100644 --- a/lib/master/starter.js +++ b/lib/master/starter.js @@ -188,7 +188,10 @@ starter.localrun = function (cmd, host, options, callback) { var spawnProcess = function(command, host, options, cb) { var child = null; - if(env === Constants.RESERVED.ENV_DEV) { + if(env === Constants.RESERVED.ENV_PRO) { + child = cp.spawn(command, options, {detached: true, stdio: 'inherit'}); + child.unref(); + } else { child = cp.spawn(command, options); var prefix = command === Constants.COMMAND.SSH ? '[' + host + '] ' : ''; @@ -204,9 +207,6 @@ var spawnProcess = function(command, host, options, cb) { var msg = prefix + chunk.toString(); process.stdout.write(msg); }); - } else { - child = cp.spawn(command, options, {detached: true, stdio: 'inherit'}); - child.unref(); } child.on('exit', function (code) {