From 7cd010bbeeb588535c941204d01ca852be614095 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 20 Jan 2026 13:10:04 -0600 Subject: [PATCH] Install `gh` via apt in Claude Code for Web sessions (#17630) Otherwise, the session start hook fails due to network restrictions. Co-authored-by: Claude --- .claude/hooks/session-start-web.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.claude/hooks/session-start-web.sh b/.claude/hooks/session-start-web.sh index 282e68909..95a987889 100755 --- a/.claude/hooks/session-start-web.sh +++ b/.claude/hooks/session-start-web.sh @@ -3,12 +3,8 @@ set -euo pipefail # Install `gh` if ! command -v gh &> /dev/null; then - GH_VERSION="2.83.2" - mkdir -p ~/.local/bin - curl -sL "https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_amd64.tar.gz" -o /tmp/gh.tar.gz - tar -xzf /tmp/gh.tar.gz -C /tmp - mv /tmp/gh_${GH_VERSION}_linux_amd64/bin/gh ~/.local/bin/ - rm -rf /tmp/gh.tar.gz /tmp/gh_${GH_VERSION}_linux_amd64 + apt-get update -qq + apt-get install -y -qq gh fi # Install clippy and rustfmt for the active toolchain.