-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
npm/run-script
#98Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 releaseplatform:windowsis Windows-specificis Windows-specific
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
When running an npm script, in npm 8.14.0 (also 8.13.x) which iterates a directory, the iteration does not happen. The script does not seem to be parsed correctly.
The script with the iteration is:
for /D %D in (*) do (echo installing for %D & cd %D & npm install & cd ..);
This worked up to npm 8.12.2
Expected Behavior
The script is parsed as if it was run directly in cli and the iteration is executed correctly
Steps To Reproduce
- In this environment...
- Windows 10
- node 16.15.1
- npm 8.14.0
- With this config...
"scripts": {
"bundle": "npm run install:all",
"install:all": "for /D %D in (*) do (echo installing for %D & cd %D & npm install & cd ..);"
}
-
Run '...'
npm run bundle
-
See error...
D was unexpected at this time.
Environment
- npm: 8.14.0
- Node.js: 16.15.1
- OS Name: Windows 10
- System Model Name: dell precision 3551
- npm config:
npm config ls
; "user" config from C:\Users\ndeakin\.npmrc
# using a private corporate registry
; node bin location = C:\Program Files\nodejs\node.exe
; node version = v16.15.1
; npm local prefix = C:\Users\ndeakin\Documents\git\devx\frontend\admin-console
; npm version = 8.14.0
; cwd = C:\Users\ndeakin\Documents\git\devx\frontend\admin-console
; HOME = C:\Users\ndeakin
; Run `npm config ls -l` to show all defaults.
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 releaseplatform:windowsis Windows-specificis Windows-specific