You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
{
"name": "project",
"scripts": {
"css": "npm run postcss",
"xcss": "npm run postcss",
"postcss": "echo \"postcss\""
}
}
Running npm run css will run the postcss script twice. Alternatively, running npm run xcss runs it only once (intended behavior). There seems to be a grep or fuzzy search issue with how scripts are run. This problem is not unique to just 'css,' but it is the use case that brought this to my attention.
Additionally, arbitrary scripts can be executed by running npm run-script . Pre and post commands with matching names will be run for those as well (e.g. premyscript, myscript, postmyscript).
I'm opening this issue because:
npm is doing something I don't understand.
What's going wrong?
Given the following
package.json
:Running
npm run css
will run thepostcss
script twice. Alternatively, runningnpm run xcss
runs it only once (intended behavior). There seems to be a grep or fuzzy search issue with how scripts are run. This problem is not unique to just 'css,' but it is the use case that brought this to my attention....
Example output:
How can the CLI team reproduce the problem?
Described above. First impression is it seems to be related to the word
post
:npm run abc
also executespostabc
twice.supporting information:
npm -v
prints:5.0.3
(Have also reproduced on 3 and 4).node -v
prints:v6.11.0
npm config get registry
prints:https://registry.npmjs.org/
MacOS Sierra 10.12.5
The text was updated successfully, but these errors were encountered: