From 43a18205dab51f74800d7b754578d2e3f5b5b169 Mon Sep 17 00:00:00 2001 From: Valentin Anger Date: Wed, 6 Apr 2022 22:54:12 +0200 Subject: [PATCH] fix(cli/install): preserve compat flag (#14223) --- cli/tools/installer.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs index 686e127df1..a4340e98c2 100644 --- a/cli/tools/installer.rs +++ b/cli/tools/installer.rs @@ -334,6 +334,10 @@ fn resolve_shim_data( executable_args.push("--no-prompt".to_string()); } + if flags.compat { + executable_args.push("--compat".to_string()); + } + if !flags.v8_flags.is_empty() { executable_args.push(format!("--v8-flags={}", flags.v8_flags.join(","))); } @@ -588,6 +592,7 @@ mod tests { allow_read: Some(vec![]), typecheck_mode: TypecheckMode::None, log_level: Some(Level::Error), + compat: true, ..Flags::default() }, &InstallFlags { @@ -609,6 +614,7 @@ mod tests { "--allow-net", "--quiet", "--no-check", + "--compat", "http://localhost:4545/echo_server.ts", "--foobar", ]