release/v1.4.1: fix broken fzf install + add shadow detection#20
Merged
YASoftwareDev merged 4 commits intomasterfrom May 3, 2026
Merged
release/v1.4.1: fix broken fzf install + add shadow detection#20YASoftwareDev merged 4 commits intomasterfrom
YASoftwareDev merged 4 commits intomasterfrom
Conversation
added 4 commits
May 3, 2026 12:26
Fixes a class of broken installation where _install_fzf short-circuited before creating ~/.local/bin/fzf whenever ~/.fzf was already present from a previous install. With the symlink missing, an unmanaged /usr/local/bin/fzf (older than 0.48) won PATH lookup, and modern fzf shell integration (`source <(fzf --zsh)` in ~/.fzf.zsh) errored with "unknown option: --zsh" on every shell startup. Changes: - modules/base.sh: _install_fzf now reconciles the ~/.local/bin/fzf symlink unconditionally — clone-skip no longer skips symlink creation. - lib/utils.sh: new verify_managed_binaries helper that simulates the user's interactive zsh PATH and warns when an unmanaged binary shadows a managed ~/.local/bin tool. Quiet on a clean system. - install.sh + update.sh: invoke the verifier as a final read-only step. Complements _check_path_shadows (which only covered /usr/local/bin tools nvim/xcape) by catching the inverse failure mode for ~/.local/bin tools. - test.sh: strict resolution check for fzf — verifies symlink target and that command -v fzf resolves to a managed location. Catches this regression class before it ships.
- _install_fzf: drop skip_clone bool and conditional readlink check — ln -sf is already idempotent over both missing and stale targets. - verify_managed_binaries: tool list moved into the function (single source of truth); replace _any_checked/_any_issue flag pair + PATH save/restore with a single inline PATH= prefix on `command -v`; collapse multi-line warnings to one. ~50 lines → ~15. - install.sh / update.sh: callers become single-line invocations. - test.sh: regression guard now a single conditional fail (success case is silent — the existing fzf-section checks already cover it). - CHANGELOG: trim to essentials.
Self-test on real install scenarios revealed false-positive flooding: the function assumed every tool in its hardcoded list lives at ~/.local/bin/<tool>, which is only true in nosudo mode. In sudo mode (the common case), rg/fd/jq/zoxide/delta/eza are apt-installed at /usr/bin and the function would warn "an unmanaged binary will run instead" — falsely, since the apt binary IS the managed install. The actual bug class is fzf-specific: modern ~/.fzf.zsh integration (`source <(fzf --zsh)`) requires PATH to resolve to fzf >= 0.48. Other tools tolerate stale shadows without breaking shell startup. Reverting to minimal correct design: - _install_fzf already self-heals on every install (idempotent symlink). - update.sh fzf section now also self-heals — fixes existing broken installs from older dotfiles versions on next ./update.sh run. - test.sh regression guard remains as the CI-time backstop.
YASoftwareDev
added a commit
that referenced
this pull request
May 6, 2026
release/v1.4.1: fix broken fzf install + add shadow detection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_install_fzfshort-circuited before creating~/.local/bin/fzfwhenever~/.fzfwas already present from a previous install. With the symlink missing, an older unmanaged/usr/local/bin/fzf(pre-0.48) won PATH lookup, and modern~/.fzf.zsh(source <(fzf --zsh)) errored withunknown option: --zshon every shell startup. Now reconciles the symlink unconditionally.verify_managed_binarieshelper inlib/utils.sh, invoked frominstall.shandupdate.sh. Simulates the interactive zsh PATH (~/.local/binahead of system dirs as.zshrcsets it) and warns when any managed~/.local/bin/<tool>is shadowed by an unmanaged binary. Coversfzf,rg,fd,jq,zoxide,delta,eza. Complements the existing_check_path_shadowswhich only targets/usr/local/bin/{nvim,xcape}.~/.local/bin/fzfresolution check intest.shso the regression class can never re-ship from a fresh install.Background
Reproduced on a real host (
magog, Ubuntu 24.04):~/.fzf/bin/fzfwas 0.67.0,/usr/local/bin/fzfwas an old manual install pre-0.48,~/.local/bin/fzfsymlink was absent because the install was a re-run over an existing~/.fzf. PATH order made the old binary win, breaking shell startup.Test plan
bash test.sh workstation— new fzf strict-resolution check passes on clean dev boxverify_managed_binariessmoke test — silent on clean system, fires correctly when an unmanaged shadow is simulated~/.fzfexistingcurl ... | bash -s -- workstationonmagogafter merge →unknown option: --zshshould be goneRelease
Bumps
VERSION1.4.0 → 1.4.1, CHANGELOG entry under[1.4.1] - 2026-05-03.After merge, tag
v1.4.1on master and create the GitHub release.