Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 10.x version check fails #64

Open
kiswa opened this issue May 18, 2018 · 9 comments
Open

Node 10.x version check fails #64

kiswa opened this issue May 18, 2018 · 9 comments
Assignees

Comments

@kiswa
Copy link

kiswa commented May 18, 2018

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)
});
@darkguy2008 darkguy2008 self-assigned this Jun 20, 2018
@darkguy2008
Copy link
Owner

Thanks for your contribution! I've pushed a fix now to the main branch, please give it a try :)

@nikolowry
Copy link

@darkguy2008 could you release the fix? Installing from git in the meantime.

@t3chguy
Copy link

t3chguy commented Jun 24, 2018

@darkguy2008 +1 to

could you release the fix?

@alexander-schranz
Copy link

@darkguy2008 I tested the fix and it did work for me. So it should be save for a release :).

@Jab2870
Copy link

Jab2870 commented Jul 9, 2018

@darkguy2008 the fix is working for me, please release on NPM. :)

@roopemerikukka
Copy link

Has this been released to npm yet? ping @darkguy2008

@alexander-schranz
Copy link

@roopemerikukka no the last release of parallelshell was 2017. I currently did switch to concurrently.

@edrcq
Copy link
Contributor

edrcq commented Jun 15, 2019

I hope it helps

8d9df71

@bizzyvinci
Copy link

YES!

Thanks a lot. It worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants