diff options
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 { |