-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Don't try to run scripts that aren't defined #6841
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
base: master
Are you sure you want to change the base?
Conversation
b285905
to
5741471
Compare
This also includes a fix for #6389 |
2065365
to
3d9eb07
Compare
3d9eb07
to
27242a9
Compare
|
@arcanis I have updated this PR to work with |
Is anything else needed to get this merged? |
Mostly time for me to review it. I plan to make a review pass tomorrow. |
@arcanis what can we do to get this over the line? 🚗 |
This change results in a problem where installed binaries can no longer be run in workspaces. For example if your packages use example:
existing yarn:
with this change:
|
Fixes #6739
This is my first pull request with yarn (I love yarn, I got my whole company on it!), so please let me know if I've missed anything from the contributing instructions.
Right now,
yarn workspaces run script
will exit with error ifscript
is not defined in all workspaces. This is becauseyarn workspaces run
naively spawns a child process without determining if the script exists. This pull request checks that the script exists in the workspace before attempting to spawn a new child process to run the script.I also output the workspace name before each command attempt, so that we can keep track of where the script does/doesn't exist.I have added unit tests, and tested it within yarn/packages/pkg-tests: