mirror of
https://github.com/SrIzan10/nodemon.git
synced 2026-05-01 10:55:09 +00:00
Fixed #468
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user