Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] workspaces foreach should provide a --kill-others flag #6507

Open
2 tasks done
FezVrasta opened this issue Sep 17, 2024 · 0 comments
Open
2 tasks done

[Feature] workspaces foreach should provide a --kill-others flag #6507

FezVrasta opened this issue Sep 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@FezVrasta
Copy link

  • I'd be willing to implement this feature (contributing guide)
  • This feature is important to have in this repository; a contrib plugin wouldn't do

Describe the user story

I have a single root-level dev script that uses workspaces foreach to run the dev 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 npm concurrently 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 considering concurrently 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 the concurrently JS API to write a custom script that runs them. But I couldn't find an API exposed by Yarn to make this happen.

@FezVrasta FezVrasta added the enhancement New feature or request label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant