parallelshell
parallelshell copied to clipboard
Node 10.x version check fails
This line fails on Node 10.x since it's checking the version with string comparison and 10 is less than 8 in that case.
This could be replaced with:
cwd: Number(process.versions.node.split('.')[0]) < 8
? process.cwd
: process.cwd(),
Or the entire section with:
// start the children
children = [];
var nodeVer = Number(process.versions.node.split('.')[0]);
cmds.forEach(function (cmd) {
if (process.platform !== 'win32') {
cmd = 'exec ' + cmd;
}
var child = spawn(sh, [shFlag, cmd], {
cwd: nodeVer < 8 ? process.cwd : process.cwd(),
env: process.env,
stdio: ['pipe', process.stdout, process.stderr]
}).on('close', childClose);
child.cmd = cmd
children.push(child)
});
Thanks for your contribution! I've pushed a fix now to the main branch, please give it a try :)
@darkguy2008 could you release the fix? Installing from git in the meantime.
@darkguy2008 +1 to
could you release the fix?
@darkguy2008 I tested the fix and it did work for me. So it should be save for a release :).
@darkguy2008 the fix is working for me, please release on NPM. :)
Has this been released to npm yet? ping @darkguy2008
@roopemerikukka no the last release of parallelshell was 2017. I currently did switch to concurrently.
I hope it helps
https://github.com/darkguy2008/parallelshell/commit/8d9df713c12cc3fdfc09a9291cdcf6b764bc9e8e
YES!
Thanks a lot. It worked