mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 10:02:38 +03:00
Revert "Always use a tempdir for caches during tests"
This reverts commit 6572b46983
.
This commit is contained in:
parent
6572b46983
commit
a6c0bd854f
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -4009,7 +4009,6 @@ dependencies = [
|
||||
"pretty_assertions",
|
||||
"roc_parse",
|
||||
"tar",
|
||||
"tempfile",
|
||||
"ureq",
|
||||
"walkdir",
|
||||
]
|
||||
|
@ -22,6 +22,4 @@ bumpalo.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "1.3.0"
|
||||
indoc = "1.0.7"
|
||||
|
||||
tempfile.workspace = true
|
||||
indoc = "1.0.7"
|
@ -78,7 +78,6 @@ const ROC_CACHE_DIR_NAME: &str = "roc";
|
||||
///
|
||||
/// Returns None if XDG_CACHE_HOME is not set, and also we can't determine the home directory
|
||||
/// (or if %APPDATA% is missing on Windows) on this system.
|
||||
#[cfg(not(test))]
|
||||
pub fn roc_cache_dir(roc_version: &str) -> Option<PathBuf> {
|
||||
// Respect XDG, if the system appears to be using it.
|
||||
// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
@ -107,10 +106,3 @@ pub fn roc_cache_dir(roc_version: &str) -> Option<PathBuf> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn roc_cache_dir(_: &str) -> Option<PathBuf> {
|
||||
// Always use a tempdir during tests. We never want to write to the user's
|
||||
// actual cache directory during tests!
|
||||
Some(tempfile::temp_dir().unwrap())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user