diff options
Diffstat (limited to 'cli/tools')
-rw-r--r-- | cli/tools/installer.rs | 8 | ||||
-rw-r--r-- | cli/tools/standalone.rs | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs index 8ebbf8f53..2dc86f0dc 100644 --- a/cli/tools/installer.rs +++ b/cli/tools/installer.rs @@ -1,5 +1,6 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. +use crate::flags::ConfigFlag; use crate::flags::Flags; use crate::flags::InstallFlags; use crate::flags::TypeCheckMode; @@ -361,7 +362,7 @@ fn resolve_shim_data( executable_args.push(import_map_url.to_string()); } - if let Some(config_path) = &flags.config_path { + if let ConfigFlag::Path(config_path) = &flags.config_flag { let mut copy_path = file_path.clone(); copy_path.set_extension("tsconfig.json"); executable_args.push("--config".to_string()); @@ -404,6 +405,7 @@ fn is_in_path(dir: &Path) -> bool { mod tests { use super::*; + use crate::flags::ConfigFlag; use std::process::Command; use test_util::testdata_path; use test_util::TempDir; @@ -771,7 +773,9 @@ mod tests { let result = install( Flags { - config_path: Some(config_file_path.to_string_lossy().to_string()), + config_flag: ConfigFlag::Path( + config_file_path.to_string_lossy().to_string(), + ), ..Flags::default() }, InstallFlags { diff --git a/cli/tools/standalone.rs b/cli/tools/standalone.rs index 9f24b5f08..d682ed88c 100644 --- a/cli/tools/standalone.rs +++ b/cli/tools/standalone.rs @@ -264,7 +264,7 @@ pub fn compile_to_runtime_flags( cache_blocklist: vec![], cache_path: None, cached_only: false, - config_path: None, + config_flag: Default::default(), coverage_dir: flags.coverage_dir.clone(), enable_testing_features: false, ignore: vec![], |