diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-12-08 11:50:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-08 11:50:09 -0500 |
commit | 91443bbc0b3e5420d8a0b3506f1b18a88d48560a (patch) | |
tree | 804e60461874a71af08760f3aa1809c782558ac0 /cli/args/flags.rs | |
parent | a6b5d05311f54d085a1e44f4a51717b4c0a4c74b (diff) |
fix(compile): ensure import map is used when specified in deno config file (#16990)
Closes #14246
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r-- | cli/args/flags.rs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index f1acbf48d..f4bc0c862 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -10,7 +10,6 @@ use deno_core::serde::Deserialize; use deno_core::serde::Serialize; use deno_core::url::Url; use deno_runtime::permissions::parse_sys_kind; -use deno_runtime::permissions::PermissionsOptions; use log::debug; use log::Level; use once_cell::sync::Lazy; @@ -482,20 +481,6 @@ impl Flags { } } - pub fn permissions_options(&self) -> PermissionsOptions { - PermissionsOptions { - allow_env: self.allow_env.clone(), - allow_hrtime: self.allow_hrtime, - allow_net: self.allow_net.clone(), - allow_ffi: self.allow_ffi.clone(), - allow_read: self.allow_read.clone(), - allow_run: self.allow_run.clone(), - allow_sys: self.allow_sys.clone(), - allow_write: self.allow_write.clone(), - prompt: !self.no_prompt, - } - } - pub fn has_permission(&self) -> bool { self.allow_all || self.allow_hrtime @@ -2997,11 +2982,7 @@ fn permission_args_parse(flags: &mut Flags, matches: &clap::ArgMatches) { flags.allow_ffi = Some(vec![]); flags.allow_hrtime = true; } - #[cfg(not(test))] - let has_no_prompt_env = env::var("DENO_NO_PROMPT") == Ok("1".to_string()); - #[cfg(test)] - let has_no_prompt_env = false; - if has_no_prompt_env || matches.is_present("no-prompt") { + if matches.is_present("no-prompt") { flags.no_prompt = true; } } |