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

[BUG] npx passes arguments incorrectly as of 7.1.0 #2423

Closed
blixt opened this issue Dec 29, 2020 · 3 comments · Fixed by #2448
Closed

[BUG] npx passes arguments incorrectly as of 7.1.0 #2423

blixt opened this issue Dec 29, 2020 · 3 comments · Fixed by #2448
Assignees
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@blixt
Copy link

blixt commented Dec 29, 2020

Current Behavior:

# With npm v7.1.0 or later (below output is from v7.3.0):
$ npx concurrently "echo one" "echo two" "echo three"
[0]
[2]
[4]
[3] /bin/sh: two: command not found
[1] /bin/sh: one: command not found
[5] /bin/sh: three: command not found
[4] echo exited with code 0
[2] echo exited with code 0
[0] echo exited with code 0
[5] three exited with code 127
[1] one exited with code 127
[3] two exited with code 127
npm ERR! code 1
npm ERR! path /Users/blixt/src/github.com/framer/FramerWeb
npm ERR! command failed
npm ERR! command sh -c concurrently echo one echo two echo three

Expected Behavior:

# With npm v7.0.15 or earlier (including npm v6):
$ npx concurrently "echo one" "echo two" "echo three"
[0] one
[1] two
[2] three
[1] echo two exited with code 0
[0] echo one exited with code 0
[2] echo three exited with code 0

Steps To Reproduce:

  1. Run npx concurrently "echo one" "echo two" "echo three"
  2. See output for 6 commands (three of which were supposed to be arguments)

Also note the error output, which shows the quotes missing (sh -c concurrently echo one echo two echo three).

Environment:

  • OS: macOS 11.1 Big Sur
  • Node: 15.5.0 (doesn't seem to matter)
  • npm: 7.3.0
@blixt blixt added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Dec 29, 2020
@ljharb
Copy link
Contributor

ljharb commented Dec 29, 2020

What happens if you run npx concurrently -- "echo one" "echo two" "echo three"?

@blixt
Copy link
Author

blixt commented Dec 29, 2020

What happens if you run npx concurrently -- "echo one" "echo two" "echo three"?

No difference:

# Run with npm v7.3.0:
npx concurrently -- "echo one" "echo two" "echo three"
[0]
[1] /bin/sh: one: command not found
[2]
[3] /bin/sh: two: command not found
[4]
[5] /bin/sh: three: command not found
[5] three exited with code 127
[4] echo exited with code 0
[3] two exited with code 127
[2] echo exited with code 0
[1] one exited with code 127
[0] echo exited with code 0
npm ERR! code 1
npm ERR! path /Users/blixt/src/github.com/framer/FramerStudio
npm ERR! command failed
npm ERR! command sh -c concurrently -- echo one echo two echo three

@nlf
Copy link
Contributor

nlf commented Jan 21, 2021

this should be resolved in the latest release 7.4.3, please do let us know if you continue to see this problem after updating!

@nlf nlf closed this as completed Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants