-
Notifications
You must be signed in to change notification settings - Fork 246
Open
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
run-script with the --workspaces flag will run all workspace scripts, regardless if one script exits with exit code 1. Please see the "Steps to Reproduce" section.
Expected Behavior
I would expect that run-script would short-circuit and not run the other scripts if one fails. Alternatively, a new flag (e.g. --short-circuit) could be introduced to run-script in order to maintain backwards compatibility.
Steps To Reproduce
Consider the following scenario:
- A root
package.jsonfile has"workspaces": ["a", "b", "c"] a/package.jsonhas the script"build": "exit 1"- Both
b/package.jsonandc/package.jsonhave the the script"build": "exit 0"
Run npm run build --workspaces and note that all scripts are run.
Environment
- OS: Windows 10
- Node: 16.10.0
- npm: 7.24.0
jansiegel, gavinsharp, outbounder, ShaPOC, szymon-okroj and 32 morejohnnyshankman and reesscotjesse-r-s-hines