fix(install): loud dependency failures for jq, audio, and pdftotext#1073
Open
MHoroszowski wants to merge 1 commit intodanielmiessler:mainfrom
Open
fix(install): loud dependency failures for jq, audio, and pdftotext#1073MHoroszowski wants to merge 1 commit intodanielmiessler:mainfrom
MHoroszowski wants to merge 1 commit intodanielmiessler:mainfrom
Conversation
install.sh previously hid package-manager errors behind `2>/dev/null` and silently skipped runtime tools PAI actually needs at runtime, so users on Linux/WSL hit cryptic failures well after install claimed to succeed. This adds: - A `PKG_MGR` detection prelude (brew, apt-get, dnf, yum) used by the install branches and the dependency hints. - A loud git install branch: unknown package managers now exit 1 with a manual-install pointer instead of silently warning; apt/dnf/yum errors propagate. The Darwin/brew path is preserved byte-identical. - A loud bun install branch: the `curl ... | bash 2>/dev/null` no longer swallows installer errors. - A new runtime dependency check (`check_dep` helper) that verifies jq, an audio player (mpg123 or ffplay), and pdftotext before the installer hands off to main.ts. Missing deps print a per-package- manager install command, link the tracking issue, and exit 1. statusline-command.sh also now fails gracefully when jq is missing: it prints an install hint and exits 0, since the statusline is decorative and a non-zero exit would block Claude Code sessions. Fixes danielmiessler#1065
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.shpreviously hid package-manager errors behind2>/dev/nulland silently skipped runtime tools PAI actually needs,so users on Linux/WSL hit cryptic failures well after install claimed
to succeed. This PR makes those failures loud and actionable.
install.sh (
Releases/v4.0.3/.claude/PAI-Install/install.sh)brew,apt-get,dnf,yumin that order and setsPKG_MGR(orunknown).Shared by the install branches and the dependency hints.
manual-install pointer instead of silently warning; apt/dnf/yum
errors propagate. The Darwin/brew path is preserved
byte-identical (no Mac available for testing — please verify on
review).
curl ... | bash 2>/dev/nullno longerswallows installer errors (network failures, missing unzip, arch
mismatches).
check_dephelper verifiesjq,mpg123 OR ffplay, andpdftotextbefore the installerhands off to
main.ts. Missing deps print a per-package-managerinstall command and link statusline-command.sh silently shows empty defaults when jq is missing (common on fresh Linux/WSL installs) #1065.
statusline-command.sh (
Releases/v4.0.3/.claude/statusline-command.sh)set -o pipefail: ifjqis missing, print aninstall hint and
exit 0. The statusline is decorative and anon-zero exit would block Claude Code sessions — the actionable
message is what closes the bug for affected users.
Test plan
bash -non both filesjqremoved:install.shexitsnon-zero, names the missing deps, prints per-PKG_MGR hints
(unknown branch tested), and links statusline-command.sh silently shows empty defaults when jq is missing (common on fresh Linux/WSL installs) #1065.
apt-getin PATH:dep check passes, success banner prints, installer proceeds.
statusline-command.shwithjqmasked: prints the installhint, exits 0.
git diff main...shows exactly the two files.from before this PR.
Fixes #1065