Skip to content

[BUG] npx --force warning hides confirmation prompt to install package #3461

@bmwalters

Description

@bmwalters

Current Behavior

When using npx --force, the warning printed due to using --force covers up the prompt asking the user to enter "y" to proceed. At first glance it looks like the command has hung waiting for I/O or something.

$ npx --force mkdirp
npm WARN using --force Recommended protections disabled.
Need to install the following packages:
  mkdirp
⸨░░░░░░░░░░░░░░░░░░⸩ ⠙ : WARN using --force Recommended protections disabled.

Expected Behavior

The command output should not hide the line prompting the user to enter "y" to proceed.

Steps To Reproduce

  1. Use a system without any packages installed globally / in the cache.
  2. npx --force mkdirp.
  3. Observe the command output.

Environment

  • OS: macOS 11.3.1
  • Node: 16.3.0
  • npm: 7.15.1
  • shell: fish 3.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingGood First Issuegood issue or PR for newcomersPriority 2secondary priority issueRelease 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