-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
npm/run-script
#22Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 releaseplatform:windowsis Windows-specificis Windows-specific
Milestone
Description
Current Behavior:
Our setup uses environment variables to pass parameters to npm scripts. With npm v7, Windows-style environment variables like %foo% are no longer expanded (on Windows).
Expected Behavior:
Windows-style environment variables used by npm scripts should be expanded (on Windows) like they are with npm v6. Alternatively, Unix-style environment variables should be made to work on Windows.
Steps To Reproduce:
- From a clean node project,
- Set the test script in
package.jsonto"echo %HelloWorld%" - In a command prompt, set the environment variable using
set "HelloWorld=Hello world!" - Run the script using
npm run test - With npm v7, the output is
%HelloWorld%instead ofHello world!.
Environment:
- OS: Windows 10 20H2
- Node: 14.15.5
- npm: 7.5.4
harleenarora, lmeyer1 and ardaOnal
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 releaseplatform:windowsis Windows-specificis Windows-specific