mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-30 08:33:49 +00:00
Rename Python install scratch directory from .cache
-> .temp
(#9756)
Addressing the confusion in https://github.com/astral-sh/uv/issues/9749
This commit is contained in:
parent
eb21e4bd25
commit
cb038582b9
4 changed files with 17 additions and 17 deletions
|
@ -127,9 +127,9 @@ impl ManagedPythonInstallations {
|
|||
))
|
||||
}
|
||||
|
||||
/// Return the location of the cache directory for managed Python installations.
|
||||
pub fn cache(&self) -> PathBuf {
|
||||
self.root.join(".cache")
|
||||
/// Return the location of the scratch directory for managed Python installations.
|
||||
pub fn scratch(&self) -> PathBuf {
|
||||
self.root.join(".temp")
|
||||
}
|
||||
|
||||
/// Initialize the Python installation directory.
|
||||
|
@ -156,9 +156,9 @@ impl ManagedPythonInstallations {
|
|||
// Create the directory, if it doesn't exist.
|
||||
fs::create_dir_all(root)?;
|
||||
|
||||
// Create the cache directory, if it doesn't exist.
|
||||
let cache = self.cache();
|
||||
fs::create_dir_all(&cache)?;
|
||||
// Create the scratch directory, if it doesn't exist.
|
||||
let scratch = self.scratch();
|
||||
fs::create_dir_all(&scratch)?;
|
||||
|
||||
// Add a .gitignore.
|
||||
match fs::OpenOptions::new()
|
||||
|
@ -207,7 +207,7 @@ impl ManagedPythonInstallations {
|
|||
})
|
||||
}
|
||||
};
|
||||
let cache = self.cache();
|
||||
let cache = self.scratch();
|
||||
Ok(dirs
|
||||
.into_iter()
|
||||
.filter(|path| *path != cache)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue