Skip to content

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

@blixt

Description

@blixt

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

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions