-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
needs-decisionUndecided if this should be doneUndecided if this should be done
Description
If you accidentally set UV_CACHE_DIR
to some working directory, uv cache clean
will blow it away, since it's effectively an rm -rf
. This matches the behavior of other tools (e.g., cargo), but we may want to consider guarding against these outcomes. It's not totally trivial, because uv cache clean
is intended to clear out contents from previous uv versions -- in other words, uv cache clean
doesn't have a clear enumeration of "all contents that are part of the uv cache", since there might be other directories or files that were introduced and removed in prior uv versions. However, we could...
- Always prompt (with the directory name) prior to removal.
- Prompt if we see directories of files that don't end in
-v\d+
(i.e., a version suffix). - Prompt if we don't see a
CACHEDIR.TAG
(since we've always had this).
Metadata
Metadata
Assignees
Labels
needs-decisionUndecided if this should be doneUndecided if this should be done