[X] I have searched all issues/PRs to ensure it has not already been reported or fixed.
[X] I have verified that I am using the latest version of Scoop and corresponding bucket.
Package Name
gogo
Expected/Current Behaviour
使用scoop install gogo安装时失败,报错如下
Creating shim for 'gogo'.
Get-Command: C:\Users\Ender\scoop\apps\scoop\current\lib\install.ps1:757
Line |
757 | $bin = (Get-Command $target).Source
| ~~~~~~~~~~~~~~~~~~~
| The term 'gogo.exe' is not recognized as a name of a cmdlet, function, script file, or executable program.
| Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Can't shim 'gogo.exe': File doesn't exist.
❯ scoop install gogo
Installing 'gogo' (2.13.4) [64bit] from 'sec' bucket
Loading gogo_windows_amd64.exe from cache
Checking hash of gogo_windows_amd64.exe ... ok.
Linking ~\scoop\apps\gogo\current => ~\scoop\apps\gogo\2.13.4
Creating shim for 'gogo'.
Get-Command: C:\Users\Ender\scoop\apps\scoop\current\lib\install.ps1:757
Line |
757 | $bin = (Get-Command $target).Source
| ~~~~~~~~~~~~~~~~~~~
| The term 'gogo.exe' is not recognized as a name of a cmdlet, function, script file, or executable program.
| Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Can't shim 'gogo.exe': File doesn't exist.
Possible Solution
使用pre_install在创建shim前重命名文件
"pre_install": [
"if (Test-Path \"$dir\\gogo_windows_amd64.exe\") {",
" Rename-Item \"$dir\\gogo_windows_amd64.exe\" \"$dir\\gogo.exe\"",
"} elseif (Test-Path \"$dir\\gogo_windows_386.exe\") {",
" Rename-Item \"$dir\\gogo_windows_386.exe\" \"$dir\\gogo.exe\"",
"}"
],
### Scoop and Buckets Version
```console
❯ scoop --version
Current Scoop version:
859d1db5 (HEAD -> master, tag: v0.5.2, origin/master, origin/HEAD) chore(release): Bump to version 0.5.2 (#6080)
'main' bucket:
7523a98b7 (HEAD -> master, origin/master, origin/HEAD) mariadb@11.5.2: Fix download url & autoupdate (#6269)
'versions' bucket:
29b03e5ef (HEAD -> master, origin/master, origin/HEAD) swift-nightly: Update to version 20241022.1
'sec' bucket:
03abab7 (HEAD -> main, origin/main, origin/HEAD) proguard: Update to version 7.6.0
Prerequisites
Package Name
gogo
Expected/Current Behaviour
使用
scoop install gogo
安装时失败,报错如下排查发现下载的文件名为
gogo_windows_amd64.exe
而不是gogo.exe
,应该是这个问题导致的Steps to Reproduce
Possible Solution
使用pre_install在创建shim前重命名文件
Scoop Config
PowerShell Version
Additional Softwares
No response