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 childrenchildren=[];varnodeVer=Number(process.versions.node.split('.')[0]);cmds.forEach(function(cmd){if(process.platform!=='win32'){cmd='exec '+cmd;}varchild=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=cmdchildren.push(child)});
This line fails on Node 10.x since it's checking the version with string comparison and
10is less than8in that case.This could be replaced with:
Or the entire section with: