Skip to content

Commit

Permalink
ci(winows): Simply use the TEMP dir
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Aug 30, 2024
1 parent 8674968 commit fb21875
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ jobs:
env:
CARGO_HOME: ${{ env.DEV_DRIVE }}/.cargo
RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
UV_INTERNAL__TEST_DIR: ${{ env.DEV_DRIVE }}/tmp-uv
TEMP: ${{ env.DEV_DRIVE }}/tmp-uv
run: |
cargo nextest run --no-default-features --features python,pypi --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow
Expand Down
9 changes: 1 addition & 8 deletions crates/uv-cache/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,7 @@ impl Cache {

/// Create a temporary cache directory.
pub fn temp() -> Result<Self, io::Error> {
let temp_dir =
if let Ok(test_dir) = std::env::var("UV_INTERNAL__TEST_DIR").map(PathBuf::from) {
let uv_cache_dir = test_dir.join("uv-cache");
let _ = fs_err::create_dir_all(&uv_cache_dir);
tempfile::tempdir_in(uv_cache_dir)?
} else {
tempfile::tempdir()?
};
let temp_dir = tempfile::tempdir()?
Ok(Self {
root: temp_dir.path().to_path_buf(),
refresh: Refresh::None(Timestamp::now()),
Expand Down

0 comments on commit fb21875

Please sign in to comment.