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 <noreply@anthropic.com>
This commit is contained in:
Zanie Blue
2026-01-20 13:10:04 -06:00
committed by GitHub
parent 8c1c6ecbe6
commit 7cd010bbee
+2 -6
View File
@@ -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.