fix: replace broken native installer bootstrap script#26175
Open
rlueder wants to merge 1 commit intoanthropics:mainfrom
Open
fix: replace broken native installer bootstrap script#26175rlueder wants to merge 1 commit intoanthropics:mainfrom
rlueder wants to merge 1 commit intoanthropics:mainfrom
Conversation
The current bootstrap script at https://claude.ai/install.sh delegates to the binary's internal `install` subcommand, which silently fails to create ~/.local/bin/claude. Worse, it then deletes the user's existing npm global install as "cleanup", leaving them with no working `claude` command at all. This script reuses all the working parts of the original (argument validation, platform detection, GCS download, SHA256 verification) but replaces the broken install step with a direct `mv` of the verified binary to ~/.local/bin/claude, adds shell rc file PATH setup, and verifies the binary works before reporting success. Fixes anthropics#26173 Relates to anthropics#17486 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
curl -fsSL https://claude.ai/install.sh | bashbootstrap script delegates to the downloaded binary'sinstallsubcommand, which silently fails to create~/.local/bin/claudeclaudecommandinstall.shthat directly places the verified binary at~/.local/bin/claude, sets up PATH in the user's shell rc file, and verifies the install before reporting successWhat changed vs the original bootstrap.sh
stable|latest|VERSION"$binary_path" install(silently fails)mv "$binary_path" ~/.local/bin/claudeclaude --versionto confirmContext
The native binary downloaded from GCS is a standalone ~175MB Mach-O executable (Bun-bundled) that works when run directly — the download and verification logic in the original script is fine. The only problem is the
"$binary_path" installstep, which fails to create the launcher and then the script removes the user's existing working install.Note: The actual bootstrap.sh is hosted on GCS (
claude-code-dist-*/claude-code-releases/bootstrap.sh), not in this repo. This PR adds the fixed script here as a reference for the internal team to apply to the hosted version.Test plan
bash install.shon macOS arm64 — binary at~/.local/bin/claude~/.local/bin/claude --version— prints version~/.zshrc(or appropriate rc file)claude --version— worksFixes #26173 #21061 #20490 #20345
Relates to #17486
🤖 Generated with Claude Code