diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-05-25 14:27:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-25 14:27:45 -0400 |
commit | 2ebd61ee1b09c8060c2da66890bf6ac024d97b67 (patch) | |
tree | 014c6d35e1f820811a2ff6dcb0e96c60f360de1f /cli/args/mod.rs | |
parent | 76400149a49f44b734b5cacf438722bc3c07c1d1 (diff) |
fix(compile): handle when DENO_DIR is readonly (#19257)
Closes #19253
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r-- | cli/args/mod.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 8b3d79308..6dab0c973 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -67,7 +67,6 @@ use std::path::PathBuf; use std::sync::Arc; use thiserror::Error; -use crate::cache::DenoDir; use crate::file_fetcher::FileFetcher; use crate::npm::CliNpmRegistryApi; use crate::npm::NpmProcessState; @@ -724,10 +723,6 @@ impl CliOptions { } } - pub fn resolve_deno_dir(&self) -> Result<DenoDir, AnyError> { - Ok(DenoDir::new(self.maybe_custom_root())?) - } - /// Based on an optional command line import map path and an optional /// configuration file, return a resolved module specifier to an import map /// and a boolean indicating if unknown keys should not result in diagnostics. @@ -1114,12 +1109,8 @@ impl CliOptions { &self.flags.location } - pub fn maybe_custom_root(&self) -> Option<PathBuf> { - self - .flags - .cache_path - .clone() - .or_else(|| env::var("DENO_DIR").map(String::into).ok()) + pub fn maybe_custom_root(&self) -> &Option<PathBuf> { + &self.flags.cache_path } pub fn no_clear_screen(&self) -> bool { |