-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[BUG] npx pass ESCAPED multiline string argument to package #3337
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
Comments
Comparison $ docker run -it node /bin/bash
$ npx cowsay "$(node --version; npm --version)"
________________
< v17.4.0\n8.3.1 >
----------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
May 30, 2021 $ docker run -it node /bin/bash
$ npx cowsay "$(node --version; npm --version)"
_________________
< v15.14.0\n7.7.6 >
-----------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| || $ docker run -it node:fermium /bin/bash
$ npx cowsay "$(node --version; npm --version)"
__________
/ v14.16.1 \
\ 6.14.12 /
----------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| || $ docker run -it node:erbium /bin/bash
$ npx cowsay "$(node --version; npm --version)"
__________
/ v12.22.1 \
\ 6.14.12 /
----------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| || $ docker run -it node:lts /bin/bash
$ npx cowsay "$(node --version; npm --version)"
__________
/ v14.17.0 \
\ 6.14.13 /
----------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| || |
Special character other than LF $ npx cowsay $'1\f2'
______
< 1\f2 >
------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
$ cowsay $'1\f2'
____
< 1
2 >
----
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| || |
Hello, I've encountered this too! I was searching for "new line" in issues and haven't noticed this ticket. For now I see the workaround is to use stdin instead of args. |
A gentle bump on this one. It's breaking commently-cli when passing multi-line |
Temporary workaround: $(npx --package=cowsay which cowsay) "$(node --version; npm --version)" |
Can confirm this is still happening in the current version of the npm cli ( Other possible workaround seems to be using the
|
Uh oh!
There was an error while loading. Please reload this page.
Brief
npx
andnpm exec
pass ESCAPED multiline string, instead of original string.Is there an existing issue for this?
Current Behavior
Expected Behavior
Steps To Reproduce
docker run -it node /bin/bash
npx cowsay "$(node --version; npm --version)"
Environment
Docker: node
The text was updated successfully, but these errors were encountered: