From 2ebd61ee1b09c8060c2da66890bf6ac024d97b67 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 25 May 2023 14:27:45 -0400 Subject: fix(compile): handle when DENO_DIR is readonly (#19257) Closes #19253 --- cli/args/mod.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'cli/args') 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 { - 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 { - self - .flags - .cache_path - .clone() - .or_else(|| env::var("DENO_DIR").map(String::into).ok()) + pub fn maybe_custom_root(&self) -> &Option { + &self.flags.cache_path } pub fn no_clear_screen(&self) -> bool { -- cgit v1.2.3