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

add a config option to disallow the cache clean command #6610

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

elbywan
Copy link

@elbywan elbywan commented Nov 21, 2024

What's the problem this PR addresses?

At Datadog we are using yarn inside a huge monorepository using the PnP linker and Zero-Installs with all the dependencies versioned through git.

The issue we have is that people frequently have the tendency to think that this kind of environment works like others, and that cleaning the cache is the way to go whenever they encounter an install issue (like deleting node_modules).

This is obviously not the case and we have to tell them to restore their packages from the git remote when that happens, which is a bit cumbersome.

see also: #6518

How did you fix it?

This PR adds a non-breaking option inside the .yarnrc file to disallow running yarn clean cache.

cc @arcanis

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@elbywan elbywan changed the title add an config to disallow the cache clean command add a config option to disallow the cache clean command Nov 22, 2024
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.

1 participant