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

Breaks between node 4.7.3 and 4.8.0 #1

Closed
naugtur opened this issue Mar 29, 2017 · 1 comment
Closed

Breaks between node 4.7.3 and 4.8.0 #1

naugtur opened this issue Mar 29, 2017 · 1 comment

Comments

@naugtur
Copy link
Contributor

naugtur commented Mar 29, 2017

[edit] simply put: tests are failing on node v4.8.0 and up (including 6.x 7.x)

I run a commands with some arguments:

In node v4.7.3 and earlier versions

spawnShell(`npm install --production --no-optional --unsafe-perm=false --prefix=${dir}`)

The same code breaks by calling just npm and passing all other arguments to bash instead of npm. npm prints usage information instead of installing.

To make a command work in node v4.8.0 or higher, I need to put additional quotes inside, so when passing to bash -c it works as expected.

spawnShell(`"npm install --production --no-optional --unsafe-perm=false --prefix=${dir}"`)

I'm using the latest version of spawn-shell

@parro-it
Copy link
Owner

Thank you @naugtur: please node that in node v4.8.0 or higher there is a "shell" argument in spawn method, so you can easily obtain the same effects than using this module.

It would, anyway, preferable to make it work, because one may need to support both old and newer node versions... I will do some investigation soon, thank you!

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

2 participants