My old spawn check was based on the minor value being >= 8, of course now io.js is 1.0.2, it wasn't using the new spawn method, and silencing user scripts.
This commit is contained in:
Remy Sharp
2015-01-19 21:58:49 +00:00
parent d288c0defb
commit 3feff5035e

View File

@@ -12,7 +12,8 @@ var utils = require('../utils'),
noop = function() {},
restart = null,
psTree = require('ps-tree'),
nodeMajor = parseInt((process.versions.node.split('.') || [null,null])[1] || 0, 10),
nodeMajor = parseInt((process.versions.node.split('.') || [null,null])[0] || 0, 10),
nodeMinor = parseInt((process.versions.node.split('.') || [null,null])[1] || 0, 10),
hasPS = true;
// discover if the OS has `ps`, and therefore can use psTree
@@ -57,7 +58,9 @@ function run(options) {
var args = [cmd.executable].concat(cmd.args).join(' ').trim();
var spawnArgs = [sh, [shFlag, args]];
if (nodeMajor >= 8) {
if (nodeMajor === 0 && nodeMinor < 8) {
// use the old spawn args :-\
} else {
spawnArgs.push({
env: utils.merge(options.execOptions.env, process.env),
stdio: stdio