[BUG] Modules run via npx interpret strings that look like environment variables #3600
Closed
1 task done
Labels
Bug
thing that needs fixing
Priority 2
secondary priority issue
Release 7.x
work is associated with a specific npm 7 release
Is there an existing issue for this?
Current Behavior
npm exec
is interpreting argv strings that look like environment variables. Passing, for example,test$param
results intest
being passed to the module (becauseparam
is not defined in the environment).Expected Behavior
Strings passed should not be interpreted.
Steps To Reproduce
Issue occurs with this environment:
npm
>=v7.1.0.Earlier versions are unaffected.
Installed
node
version doesn't appear to matter (tested with various v14/v15/v16 releases)With this config
a file in
node_modules/.bin/testington
with this content:Note proper quotes used to avoid bash interpreting the string.
Note that npx intereprets environment variables within the string before they reach the module.
Environment
The text was updated successfully, but these errors were encountered: