cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] Regression in 8.13.0 on Windows: `echo 5%` prints just `5` instead of `5%`

Open lydell opened this issue 3 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

This issue exists in the latest npm version

  • [X] I am using the latest npm

Current Behavior

$ npm test

> test
> echo 5%

5

This happens since 8.13.0.

Expected Behavior

$ npm test

> test
> echo 5%

5%

8.12.2 prints 5% as expected.

Steps To Reproduce

  1. Use Windows

  2. With this package.json:

    {
      "private": true,
      "scripts": {
        "test": "echo 5%"
      }
    }
    
  3. Run npm test

  4. Notice how the percentage sign is gone.

Environment

  • npm: 8.16.0
  • Node.js: 18.7.0
  • OS Name: Windows 10
  • System Model Name: PC

lydell avatar Aug 09 '22 20:08 lydell

Can confirm, stumbled upon it with different scenario:

# npx echo-cli Привіт

╨Я╤А╨╕╨▓╤Ц╤В

OS: Windows 10 with English locale.

simplesmiler avatar Aug 10 '22 15:08 simplesmiler

this should work correctly as of [email protected], but please do reopen the issue if you can still reproduce it

nlf avatar Aug 15 '22 17:08 nlf

Amazing!

For the curious following along, this was the fix I think: https://github.com/npm/run-script/pull/98

lydell avatar Aug 15 '22 17:08 lydell