From 795ed23b356dc044cfb497a6189d588604a6c335 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:37:13 -0700 Subject: fix(future): Emit `deno install` warning less often, suggest `deno install` in error message (#24706) Two small changes: - In our BYONM errors, suggest running `deno install` instead of `npm install` if `DENO_FUTURE` is set - Only emit warning about `deno install` changes if you do `deno install ` with deno_future unset --- cli/tools/installer.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli/tools') diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs index 01ed36711..d1beb79bb 100644 --- a/cli/tools/installer.rs +++ b/cli/tools/installer.rs @@ -283,12 +283,12 @@ pub async fn install_command( flags: Arc, install_flags: InstallFlags, ) -> Result<(), AnyError> { - if !install_flags.global { - log::warn!("⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag."); - } - match install_flags.kind { InstallKind::Global(global_flags) => { + if !install_flags.global { + log::warn!("⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag."); + } + install_global(flags, global_flags).await } InstallKind::Local(maybe_add_flags) => { -- cgit v1.2.3