From fb21875d8ff58c44a8c695ff24d7a686bdd514a4 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Fri, 30 Aug 2024 11:56:09 +0200 Subject: [PATCH] ci(winows): Simply use the TEMP dir As suggested by @samypr100 on #6680: https://github.com/astral-sh/uv/pull/6680#issuecomment-2313607984 --- .github/workflows/ci.yml | 2 +- crates/uv-cache/src/lib.rs | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c87a09b89cfa4..02c114d566f97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/crates/uv-cache/src/lib.rs b/crates/uv-cache/src/lib.rs index 0c48d0e421e63..8eb35ba1906cd 100644 --- a/crates/uv-cache/src/lib.rs +++ b/crates/uv-cache/src/lib.rs @@ -135,14 +135,7 @@ impl Cache { /// Create a temporary cache directory. pub fn temp() -> Result { - 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()),