Skip to content

Commit

Permalink
Update installer.ps1
Browse files Browse the repository at this point in the history
[GitHub #133 #98]
  • Loading branch information
ccmywish committed Dec 7, 2024
1 parent b316324 commit e094415
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
<details>
<summary>Windows</summary>

<div style="magrin-top: 10px"> </div>

- 可通过 `scoop` 安装,感谢 [@Gn3po4g][@niheaven]

```bash
Expand All @@ -113,7 +115,7 @@ $ scoop install chsrc
若下方链接无法访问,可使用 `https://gitee.com/RubyMetric/chsrc/raw/main/tool/installer.ps1` 替代

```PowerShell
$ iwr -useb "https://chsrc.run/windows" | iex
"& { $(iwr -useb https://chsrc.run/windows) } -Version pre" | iex
```

<br>
Expand Down
5 changes: 3 additions & 2 deletions tool/installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Contributors : Aoran Zeng <[email protected]>
# |
# Created On : <2024-10-26>
# Last Modified : <2024-10-27>
# Last Modified : <2024-12-07>
#
# chsrc installer for Windows
# ---------------------------------------------------------------
Expand Down Expand Up @@ -163,7 +163,8 @@ function Install {
$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 + $outfile) -Uri $global:url -ErrorAction Stop
output_info "🎉 Installation completed, destination: " ($global:install_dir + $outfile)
# 🎉 这个符号会变成 ??? 不要添加
output_info "Installation completed, destination: " ($global:install_dir + $outfile)
} catch {
output_error "Unable to download $binary_name. Error: $_"
}
Expand Down

0 comments on commit e094415

Please sign in to comment.