Skip to content

[BUG] New --yes behavior in npx is a breaking change that can't easily be handled #2226

Closed
@MarshallOfSound

Description

@MarshallOfSound

Current Behavior: (npx@7)

npx thing prompts the user that "thing" will be installed and forces them to type "yes"

You can bypass this by providing npx --yes thing.

Expected Behavior:

npx thing installs and runs "thing" or a backwards compatible option is provided to bypass the prompt.

The fundamental issue here is that npx --yes thing**is not compatible** with npx@6, this means that any kind of generic CI scripts / build scripts need to somehow detect the version of npx being used and conditionally provide--yesor not. This is going to makenpx` style commands significantly less portable in CI / build environments because they'll either not work for all environments or all have to come with this "if npx --version === 7" wrapper.

Would be great to reconsider this new --yes behavior.

Steps To Reproduce:

npx <thing> on npm@7

Environment:

  • OS: macOS 11.0
  • Node: 15.2.1
  • npm: 7.0.12

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