fix(fish-deps): detect tools with command -q so wrappers don't mask missing binaries
Status, install, and update resolved catalog entries with `type -q`, which also matches wrapper functions that shadow a tool name (rg, rm, yt-dlp). A shadowed-but-uninstalled tool was reported "installed", skipped by `install`, and skipped by `update`. Switch these catalog-bin probes to `command -q`/`command -s` (PATH only). PM/build-tool probes (cargo, uv, paru, yay, ...) and the fisher check (a fish function) keep `type -q`.
This commit is contained in:
@@ -22,7 +22,9 @@ function _fish_deps_install
|
||||
# Determine if this dep needs attention: missing, or fish < 4.0
|
||||
set -l needs_install 0
|
||||
set -l upgrade_label Install
|
||||
if not type -q $bin
|
||||
# command -q (not type -q): a wrapper function shadowing the name
|
||||
# (rg, rm, yt-dlp) must not be mistaken for the installed binary.
|
||||
if not command -q $bin
|
||||
set needs_install 1
|
||||
else if test "$bin" = fish
|
||||
set -l _major (fish --version 2>&1 | string match -r 'version (\d+)')[2]
|
||||
|
||||
Reference in New Issue
Block a user