mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
parent
76400149a4
commit
2ebd61ee1b
10 changed files with 134 additions and 72 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue