diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2020-05-07 21:32:57 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 14:32:57 +0200 |
commit | dabe88f854b7cc04518c5ff75c55fa437360a91f (patch) | |
tree | 9505e8cce910ab80162e2e7ab7f145334b55860c /cli/global_state.rs | |
parent | 761b7efb3b8a140caad12803619a2e8a535cc178 (diff) |
fix(deno_dir): better error message (#5120)
Add better error messages when a cache subdirectory in
`DENO_DIR` cannot be created.
Diffstat (limited to 'cli/global_state.rs')
-rw-r--r-- | cli/global_state.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/global_state.rs b/cli/global_state.rs index a682e8de2..dbea5f827 100644 --- a/cli/global_state.rs +++ b/cli/global_state.rs @@ -54,7 +54,8 @@ impl GlobalState { let custom_root = env::var("DENO_DIR").map(String::into).ok(); let dir = deno_dir::DenoDir::new(custom_root)?; let deps_cache_location = dir.root.join("deps"); - let http_cache = http_cache::HttpCache::new(&deps_cache_location)?; + let http_cache = http_cache::HttpCache::new(&deps_cache_location); + http_cache.ensure_location()?; let file_fetcher = SourceFileFetcher::new( http_cache, |