fix(install): install jq prerequisite (active hooks require it)
jq is used 18+ times in always-on hooks (statusline.sh, rtk-rewrite.sh) but was never installed by any script — it only worked because dev machines happened to have it; a bare machine breaks at hook-run time. Add it to Step 1 (same inline pattern as the other prereqs) and to doctor.sh at fail level. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UyNYwD4UccVw9ZCFZyJX55
This commit is contained in:
parent
211c7d4594
commit
2194b11329
@ -127,6 +127,12 @@ else
|
||||
fail "Node.js not found"
|
||||
fi
|
||||
|
||||
if command -v jq &>/dev/null; then
|
||||
pass "jq $(jq --version 2>/dev/null | sed 's/^jq-//')"
|
||||
else
|
||||
fail "jq not found — statusline & rtk-rewrite hooks require it"
|
||||
fi
|
||||
|
||||
if command -v cargo &>/dev/null; then
|
||||
pass "Cargo $(cargo --version | awk '{print $2}')"
|
||||
else
|
||||
|
||||
@ -193,6 +193,25 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# --- jq (required by active hooks: statusline.sh, rtk-rewrite.sh) ---
|
||||
if command -v jq &>/dev/null; then
|
||||
ok "jq $(jq --version 2>/dev/null | sed 's/^jq-//')"
|
||||
else
|
||||
info "Installing jq..."
|
||||
case $OS in
|
||||
macos) brew install jq ;;
|
||||
linux-apt) sudo apt-get install -y jq ;;
|
||||
linux-dnf) sudo dnf install -y jq ;;
|
||||
linux-pacman) sudo pacman -S --noconfirm jq ;;
|
||||
*) warn "Cannot auto-install jq on $OS — statusline/rtk hooks need it" ;;
|
||||
esac
|
||||
if command -v jq &>/dev/null; then
|
||||
ok "jq installed"
|
||||
else
|
||||
warn "jq install failed — statusline & rtk-rewrite hooks require it"
|
||||
fi
|
||||
fi
|
||||
|
||||
# --- Claude Code CLI ---
|
||||
if command -v claude &>/dev/null; then
|
||||
ok "Claude Code $(claude --version 2>/dev/null | head -1)"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user