summaryrefslogtreecommitdiff
path: root/cli/cache/deno_dir.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/cache/deno_dir.rs')
-rw-r--r--cli/cache/deno_dir.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/cache/deno_dir.rs b/cli/cache/deno_dir.rs
index 05de1cf7c..88d8a31c0 100644
--- a/cli/cache/deno_dir.rs
+++ b/cli/cache/deno_dir.rs
@@ -266,6 +266,12 @@ pub mod dirs {
}
pub fn home_dir() -> Option<PathBuf> {
+ if let Some(userprofile) = std::env::var_os("USERPROFILE") {
+ if !userprofile.is_empty() {
+ return Some(PathBuf::from(userprofile));
+ }
+ }
+
known_folder(&knownfolders::FOLDERID_Profile)
}
}