mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2025-10-30 06:07:56 +00:00
* fix(core): Avoid error messages when shim broked, Allow get path for scoop aliases * update `scoop-which` * Add CHANGELOG entry * Update CHANGELOG.md Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com> --------- Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>
21 lines
476 B
PowerShell
21 lines
476 B
PowerShell
# Usage: scoop which <command>
|
|
# Summary: Locate a shim/executable (similar to 'which' on Linux)
|
|
# Help: Locate the path to a shim/executable that was installed with Scoop (similar to 'which' on Linux)
|
|
param($command)
|
|
|
|
if (!$command) {
|
|
error '<command> missing'
|
|
my_usage
|
|
exit 1
|
|
}
|
|
|
|
$path = Get-CommandPath $command
|
|
|
|
if ($null -eq $path) {
|
|
warn "'$command' not found, not a scoop shim, or a broken shim."
|
|
exit 2
|
|
} else {
|
|
friendly_path $path
|
|
exit 0
|
|
}
|