Skip to content

Node 10.x version check fails #64

Description

@kiswa

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)});

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions