From 381d565acf974b0eab2a9b7fdcf8f9372cad0c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 29 Mar 2022 03:48:29 +0200 Subject: refactor(flags): rename CheckFlag to TypecheckMode (#14111) --- cli/tools/installer.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'cli/tools/installer.rs') 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() }, -- cgit v1.2.3