Shim icon indicating copy to clipboard operation
Shim copied to clipboard

[BUG]: Unable to shim relative binary paths during update: "Get-Command: The term '...' is not recognized"

Open marcioassuncao opened this issue 7 months ago • 0 comments

Prerequisites

  • [x] I have written a descriptive issue title.
  • [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

windsurf

Expected/Current Behaviour

The process throws a CommandNotFoundException at install.ps1:

Get-Command : The term 'bin\windsurf.cmd' is not recognized as the name of a cmdlet, function, script file, or operable program.
At C:\XXXXXX\scoop\apps\scoop\current\lib\install.ps1:191 char:21
+             $bin = (Get-Command $target).Source
+                     ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (bin\windsurf.cmd:String) [Get-Command], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

Can't shim 'bin\windsurf.cmd': File doesn't exist.

Steps to Reproduce

1. Install a manifest that defines a binary with a relative path (e.g., Windsurf).
2. Run `scoop update windsurf`.
3. The installation fails during the shimming process.

Possible Solution

The script should ensure the target path is fully qualified before calling Get-Command, or verify the working directory is correctly set to the app's version directory during this phase of the installation.

Scoop and Buckets Version

PS> scoop --version
Current Scoop version:
b588a06e (HEAD -> master, tag: v0.5.3, origin/master, origin/HEAD) chore(release): Bump to version 0.5.3 (resync) (#6436)

'main' bucket:
f6b511cb01 (HEAD -> master, origin/master, origin/HEAD) uutils-coreutils: Run rm_shim in pre_uninstall instead of in uninstaller

'extras' bucket:
c9d22d8b6a (HEAD -> master, origin/master, origin/HEAD) telegram: Update to version 6.7.6

'versions' bucket:
5ba330c7d7 (HEAD -> master, origin/master, origin/HEAD) sunshine-pre: Update to version 2026.415.34134

'nonportable' bucket:
a5b608c4 (HEAD -> master, origin/master, origin/HEAD) mullvadvpn-np: Update to version 2026.2-beta1

'java' bucket:
45af0df1 (HEAD -> master, origin/master, origin/HEAD) temurin-jre: Update to version 26.0.0-35

'jetbrains' bucket:
c34ead0e (HEAD -> main, origin/main, origin/HEAD) DataSpell: Update to version 2025.2.3-252.27397.129

Scoop Config

last_update                       scoop_branch scoop_repo
-----------                       ------------ ----------
2026-04-15T09:14:01.8897757-03:00 master       https://github.com/ScoopInstaller/Scoop

PowerShell Version

Name                           Value
----                           -----
PSVersion                      5.1.26100.7920
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.26100.7920
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Additional Softwares

No response

marcioassuncao avatar Apr 15 '26 12:04 marcioassuncao