Skip to content

Warn when enableGlobalCache discards an explicit cacheFolder - #7262

Open
official-burak wants to merge 2 commits into
yarnpkg:masterfrom
official-burak:fix/warn-discarded-cache-folder
Open

official-burak wants to merge 2 commits into
yarnpkg:masterfrom
official-burak:fix/warn-discarded-cache-folder

Conversation

@official-burak

Copy link
Copy Markdown

Fixes #7239.

enableGlobalCache (true by default since Yarn 4) overwrites cacheFolder with the system-wide cache and records the source as <internal>. When the user had set cacheFolder in a yarnrc or YARN_CACHE_FOLDER, that override was discarded with no message.

If cacheFolder already has an explicit source, print YN0093 once to stderr before replacing it. No warning when the setting was never overridden.

If cacheFolder was set in the environment or a yarnrc, print YN0093
once before the setting is replaced by the system-wide cache path.
@official-burak

Copy link
Copy Markdown
Author

Pushed e55ba7e for the two Testing chores failures:

  • arca/curly on the single-statement if (cacheFolderSource) in Configuration.ts
  • yarn version check: @yarnpkg/core had no release strategy; attached a patch for @yarnpkg/core and @yarnpkg/cli (core is bundled into the CLI, same as other Configuration.ts fixes)

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.

Warn when an explicitly-set cacheFolder is discarded by enableGlobalCache

1 participant