diff options
Diffstat (limited to 'cli/tools/installer.rs')
-rw-r--r-- | cli/tools/installer.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs index 34ecc66be..c920489f2 100644 --- a/cli/tools/installer.rs +++ b/cli/tools/installer.rs @@ -287,13 +287,20 @@ pub async fn install_command( log::warn!("⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag."); } - let install_flags_global = match install_flags.kind { - InstallKind::Global(flags) => flags, + match install_flags.kind { + InstallKind::Global(global_flags) => { + install_global(flags, global_flags).await + } InstallKind::Local(maybe_add_flags) => { - return install_local(flags, maybe_add_flags).await + install_local(flags, maybe_add_flags).await } - }; + } +} +async fn install_global( + flags: Flags, + install_flags_global: InstallFlagsGlobal, +) -> Result<(), AnyError> { // ensure the module is cached let factory = CliFactory::from_flags(flags.clone())?; factory |