Skip to content

[BUG] npx pass ESCAPED multiline string argument to package #3337

@loynoir

Description

@loynoir

Brief

npx and npm exec pass ESCAPED multiline string, instead of original string.

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

$ npx cowsay -- "$(node --version; npm --version)"
 __________________
< v14.16.0\n7.15.0 >
 ------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Expected Behavior

cowsay "$(node --version; npm --version)"    
 __________
/ v14.16.0 \
\ 7.15.0   /
 ----------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Steps To Reproduce

  1. docker run -it node /bin/bash
  2. npx cowsay "$(node --version; npm --version)"

Environment

Docker: node

  • OS: Debian GNU/Linux 9 (stretch)
  • Node: v15.14.0 - v17.4.0
  • npm: 7.7.6 - 8.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingPriority 2secondary priority issueRelease 8.xwork is associated with a specific npm 8 releasecmd:execrelated to `npx`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions