-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix(linker): use lockfileFolder when creating bin links #4730
Conversation
@edorivai OK, thanks for checking. I think that issue is probably related and will have a similar solution. |
@jgoz 👍 looking forward. With the exception of some minor issues, workspaces are very awesome until now! |
I can confirm that using the STR in #4359 (comment) this no longer reproduces for me using a build from this PR branch, when it did before under yarn 1.2.1 😺 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much appreciated, thanks!
Wow, this is great thank you! I'll also check #4289 with this patch. |
**Summary** Fixes yarnpkg#4706, fixes yarnpkg#4359, refs yarnpkg#4513. `this.config.cwd` was being used as the root for bin link paths, rather than `this.config.lockfileFolder`. **Test plan** - Added tests for `add` and `remove` commands (yarnpkg#4706) - Added test for `install` command (yarnpkg#4359)
**Summary** Partial resolution for #4543. Previously, when running `yarn run` the env PATH would be set to look in node_modules/.bin, however, in workspaces the root workspace .bin path was not being included. This PR adds the workspace root node_modules/.bin path after the individual package's path. This is generally needed because #4730 ensures bin links in a workspace will be at the workspace root. With this PR, you can now `yarn run` commands in an individual package again. **Test plan** Manually tested by adding a script that runs `echo $PATH`
Summary
Fixes #4706, fixes #4359, refs #4513.
this.config.cwd
was being used as the root for bin link paths, rather thanthis.config.lockfileFolder
.Test plan
add
andremove
commands (Root binaries get removed after installing a Workspace dependency #4706)install
command (Yarn Workspaces - binaries are linked incorrectly #4359)