From 152ea4314f19db43a57f597d3937e335b2b6c45d Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Mon, 28 Oct 2024 18:03:58 +0800 Subject: [PATCH] Add extension for `installer.ps1` [GitHub #98] --- tool/installer.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tool/installer.ps1 b/tool/installer.ps1 index 39530de..dae6ec6 100644 --- a/tool/installer.ps1 +++ b/tool/installer.ps1 @@ -160,9 +160,10 @@ function Install { } try { + $outfile = "\${binary_name}.exe" output_info "Downloading $binary_name ($global:arch architecture, $platform platform, version $global:version) to $global:install_dir ..." - Invoke-WebRequest -OutFile ($global:install_dir + "\$binary_name") -Uri $global:url -ErrorAction Stop - output_info "🎉 Installation completed, destination dir: $global:install_dir" + Invoke-WebRequest -OutFile ($global:install_dir + $outfile) -Uri $global:url -ErrorAction Stop + output_info "🎉 Installation completed, destination: " ($global:install_dir + $outfile) } catch { output_error "Unable to download $binary_name. Error: $_" }