From 3ae1f1fc5a51fb0c38b107ddfb9baa7c3e68b010 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Sun, 8 Dec 2024 00:09:13 +0800 Subject: [PATCH] Sync `installer.ps1`: 2024-12-08 00:09 --- docs/windows | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/windows b/docs/windows index 39530de..f781c3d 100644 --- a/docs/windows +++ b/docs/windows @@ -5,7 +5,7 @@ # Contributors : Aoran Zeng # | # Created On : <2024-10-26> -# Last Modified : <2024-10-27> +# Last Modified : <2024-12-07> # # chsrc installer for Windows # --------------------------------------------------------------- @@ -160,9 +160,11 @@ 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: $_" }