diff --git a/rye/tests/common/mod.rs b/rye/tests/common/mod.rs index 21ed9807cf..3ffbb45b9f 100644 --- a/rye/tests/common/mod.rs +++ b/rye/tests/common/mod.rs @@ -17,7 +17,10 @@ pub const INSTA_FILTERS: &[(&str, &str)] = &[ "[TEMP_PATH]/", ), // home - (r"(\b[A-Z]:)?[\\/].*?[\\/]rye-test-home", "[RYE_HOME]"), + ( + r"(\b[A-Z]:)?[\\/].*?[\\/]rye-test-dir[\\/]home", + "[RYE_HOME]", + ), // macos temp folder (r"/var/folders/\S+?/T/\S+", "[TEMP_FILE]"), // linux temp folders @@ -34,7 +37,9 @@ fn marked_tempdir() -> TempDir { } fn bootstrap_test_rye() -> PathBuf { - let home = get_bin().parent().unwrap().join("rye-test-home"); + let test_dir = get_bin().parent().unwrap().join("rye-test-dir"); + let home = test_dir.join("home"); + fs::create_dir_all(&home).ok(); let lock_path = home.join("lock"); let mut lock = fslock::LockFile::open(&lock_path).unwrap();