summaryrefslogtreecommitdiff
path: root/cli/standalone
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-05-25 14:27:45 -0400
committerGitHub <noreply@github.com>2023-05-25 14:27:45 -0400
commit2ebd61ee1b09c8060c2da66890bf6ac024d97b67 (patch)
tree014c6d35e1f820811a2ff6dcb0e96c60f360de1f /cli/standalone
parent76400149a49f44b734b5cacf438722bc3c07c1d1 (diff)
fix(compile): handle when DENO_DIR is readonly (#19257)
Closes #19253
Diffstat (limited to 'cli/standalone')
-rw-r--r--cli/standalone/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs
index 82c41b882..14d4ad533 100644
--- a/cli/standalone/mod.rs
+++ b/cli/standalone/mod.rs
@@ -7,7 +7,7 @@ use crate::args::CacheSetting;
use crate::args::PackageJsonDepsProvider;
use crate::args::StorageKeyResolver;
use crate::cache::Caches;
-use crate::cache::DenoDir;
+use crate::cache::DenoDirProvider;
use crate::cache::NodeAnalysisCache;
use crate::file_fetcher::get_source_from_data_url;
use crate::http_util::HttpClient;
@@ -282,7 +282,7 @@ pub async fn run(
let current_exe_path = std::env::current_exe().unwrap();
let current_exe_name =
current_exe_path.file_name().unwrap().to_string_lossy();
- let dir = DenoDir::new(None)?;
+ let deno_dir_provider = Arc::new(DenoDirProvider::new(None));
let root_cert_store_provider = Arc::new(StandaloneRootCertStoreProvider {
ca_stores: metadata.ca_stores,
ca_data: metadata.ca_data.map(CaData::Bytes),
@@ -362,7 +362,7 @@ pub async fn run(
let node_resolver =
Arc::new(NodeResolver::new(fs.clone(), npm_resolver.clone()));
let cjs_resolutions = Arc::new(CjsResolutionStore::default());
- let cache_db = Caches::new(dir.clone());
+ let cache_db = Caches::new(deno_dir_provider.clone());
let node_analysis_cache = NodeAnalysisCache::new(cache_db.node_analysis_db());
let cjs_esm_code_analyzer = CliCjsEsmCodeAnalyzer::new(node_analysis_cache);
let node_code_translator = Arc::new(NodeCodeTranslator::new(