Skip to content

Comments

fix: replace broken native installer bootstrap script#26175

Open
rlueder wants to merge 1 commit intoanthropics:mainfrom
rlueder:fix/install-script-broken-launcher
Open

fix: replace broken native installer bootstrap script#26175
rlueder wants to merge 1 commit intoanthropics:mainfrom
rlueder:fix/install-script-broken-launcher

Conversation

@rlueder
Copy link

@rlueder rlueder commented Feb 16, 2026

Summary

  • The current curl -fsSL https://claude.ai/install.sh | bash bootstrap script delegates to the downloaded binary's install subcommand, which silently fails to create ~/.local/bin/claude
  • It then deletes the user's existing npm global install as "cleanup", leaving no working claude command
  • This PR provides a fixed install.sh that 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 success

What changed vs the original bootstrap.sh

Step Original (broken) This PR
Arg parsing stable|latest|VERSION Same
Platform detection Darwin/Linux, x64/arm64, Rosetta 2, musl Same
Download + checksum GCS bucket + SHA256 Same
Install step "$binary_path" install (silently fails) mv "$binary_path" ~/.local/bin/claude
PATH setup Delegated to binary (broken) Detects shell, appends to rc file
Verification None Runs claude --version to confirm
Cleanup Deletes npm global install Does not touch existing installs

Context

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" install step, 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

  • Run bash install.sh on macOS arm64 — binary at ~/.local/bin/claude
  • Run ~/.local/bin/claude --version — prints version
  • Verify PATH line added to ~/.zshrc (or appropriate rc file)
  • Open new terminal, run claude --version — works
  • Verify existing npm install is untouched

Fixes #26173 #21061 #20490 #20345
Relates to #17486

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native installer deletes working npm install but fails to create ~/.local/bin/claude launcher

1 participant