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

Yarn: use the preset location for cache and global bin #1862

Closed
wants to merge 1 commit into from

Conversation

chawyehsu
Copy link
Member

@chawyehsu chawyehsu commented Nov 21, 2017

It should be a better way, I think.
(this will break previous presist.)

@brandon93s
Copy link
Member

Are these changes addressing an issue you're experiencing with yarn?

(this will break previous presist.)

It will also break all currently installed global applications. This manifest was just updated to fix global installs with f783c38. This will also move the yarn cache and shims out of scoop and into the users localappdata. For predictability, I think I prefer them to live within the persist dir.

@chawyehsu
Copy link
Member Author

chawyehsu commented Nov 22, 2017

Cuz I found that those real global bin, more specifically, all global installed node modules are still store within %LOCALAPPDATA%, in %LOCALAPPDATA%\\Yarn\\config\\global, though we relocate bin and cache directories into scoop.

e.g.: ~\scoop\persist\yarn\bin\gulp.cmd

@"%~dp0\..\..\..\..\..\AppData\Local\Yarn\config\global\node_modules\.bin\gulp.cmd"   %*

Yarn keeps adding stuff to %APPDATA% anyway, so there is no real benefit for adding persistence to bin and cache.
—— @r15ch13

It's a little tricky that we seperate cache and global bin from the actual config things to let scoop can presist them for us to use global applications. Now for that, we can just add %LOCALAPPDATA%\\Yarn\\bin, the default directory of shims of Yarn, to PATH. Keep its original feature, and simpler, compared to current workaround which relies on ~\.yarnrc.

Looks like I'm SO OCD. Lol.

@oltolm
Copy link
Contributor

oltolm commented Nov 22, 2017

I have created a bucket for nonportable apps. It has a manifest for Node where I did something similar, so that npm stores its packages in APPDATA\npm instead of the nonstandard scoop\persist directory.

@chawyehsu chawyehsu changed the title Use the preset location for cache and global bin Yarn: use the preset location for cache and global bin Dec 16, 2017
@chawyehsu chawyehsu closed this Mar 1, 2018
@chawyehsu chawyehsu deleted the patch-2 branch March 1, 2018 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants