[Feature] workspaces foreach
should provide a --kill-others
flag
#6507
Labels
enhancement
New feature or request
Describe the user story
I have a single root-level
dev
script that usesworkspaces foreach
to run thedev
script on several workspaces. If one of the dev scripts exits unexpectedly the other commands will keep running and it is not always obvious why the development environment stopped working.Describe the solution you'd like
If the
workspaces foreach
script provided a--kill-others
flag just like the one provided by the npmconcurrently
script, we could kill all the other scripts when one of them fails.Describe the drawbacks of your solution
I'm not sure on how the
foreach
script works, but consideringconcurrently
provides this functionality I wouldn't expect an implementation to be too problematic.Describe alternatives you've considered
I thought an alternative solution would be to use the Yarn SDK to extract the list of scripts the
foreach
command would run, and then use theconcurrently
JS API to write a custom script that runs them. But I couldn't find an API exposed by Yarn to make this happen.The text was updated successfully, but these errors were encountered: