Yarn: How to change default global path in `.yarnrc` ? Like `cache-folder`

Created on 12 Dec 2017  ·  3Comments  ·  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

What is the current behavior?
How to change default global path in .yarnrc ? Like cache-folder

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Please mention your node.js, yarn and operating system version.

good first issue help wanted triaged

Most helpful comment

Global folders are a bit messy because Yarn supports Mac, Linux and Windows and tries to play by the rules of all of them.
See her https://github.com/yarnpkg/yarn/blob/master/src/constants.js#L77 -> https://github.com/yarnpkg/yarn/blob/master/src/util/user-home-dir.js#L7

Looks like it is defined as OS home dir and does not get an override.
A PR to provide a .yarnrc option to fix it is welcome

All 3 comments

Global folders are a bit messy because Yarn supports Mac, Linux and Windows and tries to play by the rules of all of them.
See her https://github.com/yarnpkg/yarn/blob/master/src/constants.js#L77 -> https://github.com/yarnpkg/yarn/blob/master/src/util/user-home-dir.js#L7

Looks like it is defined as OS home dir and does not get an override.
A PR to provide a .yarnrc option to fix it is welcome

This issues can be fixed by fixing this https://github.com/yarnpkg/yarn/issues/2334.
Let's merge it there

Was this page helpful?
0 / 5 - 0 ratings