summaryrefslogtreecommitdiff
path: root/cli/tools/installer.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-03-29 03:48:29 +0200
committerGitHub <noreply@github.com>2022-03-29 03:48:29 +0200
commit381d565acf974b0eab2a9b7fdcf8f9372cad0c33 (patch)
treee6183cfdb613b7a20cdaf285744e6cba0273f467 /cli/tools/installer.rs
parent5a6a1eeb3918985ab003fd8d87faebb76410a242 (diff)
refactor(flags): rename CheckFlag to TypecheckMode (#14111)
Diffstat (limited to 'cli/tools/installer.rs')
-rw-r--r--cli/tools/installer.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs
index 22119f731..756395d65 100644
--- a/cli/tools/installer.rs
+++ b/cli/tools/installer.rs
@@ -1,8 +1,8 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
-use crate::flags::CheckFlag;
use crate::flags::Flags;
use crate::flags::InstallFlags;
+use crate::flags::TypecheckMode;
use crate::fs_util::canonicalize_path;
use deno_core::error::generic_error;
use deno_core::error::AnyError;
@@ -306,10 +306,12 @@ fn resolve_shim_data(
// we should avoid a default branch here to ensure we continue to cover any
// changes to this flag.
- match flags.check {
- CheckFlag::All => (),
- CheckFlag::None => executable_args.push("--no-check".to_string()),
- CheckFlag::Local => executable_args.push("--no-check=remote".to_string()),
+ match flags.typecheck_mode {
+ TypecheckMode::All => (),
+ TypecheckMode::None => executable_args.push("--no-check".to_string()),
+ TypecheckMode::Local => {
+ executable_args.push("--no-check=remote".to_string())
+ }
}
if flags.unstable {
@@ -584,7 +586,7 @@ mod tests {
&Flags {
allow_net: Some(vec![]),
allow_read: Some(vec![]),
- check: CheckFlag::None,
+ typecheck_mode: TypecheckMode::None,
log_level: Some(Level::Error),
..Flags::default()
},