[BUG] install.sh and native binary report success even when installation fails

Resolved 💬 6 comments Opened Dec 10, 2025 by lev-lb Closed Dec 10, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

if the actual installation initiated by install.sh fails for whatever reason, install.sh still reports success ("✅ Installation complete!", exit code 0), even though Claude Code was not installed, and even the downloaded binaries are auto-deleted, so no trace of CC binaries is left on the machine.

What Should Happen?

if the Linux native binary invoked with with install sub-command fails - it should exit with a non-0 exit status so this can be programmatically detected, not just print _"✘ Installation failed"_ to stdout. (arguably, it should exit with a non-0 exit status if any other sub-command fails as well)

similarly, at the very end of install.sh, when it actually kicks off the installation - the script should check the exit status of the native binary ($binary_path) that it runs - after the binary itself is fixed, natch, (install.sh seems to always fetch the latest binary, even if it will actually install an older version, so reverse compat is probably irrelevant here?). here's the snippet, around line 142:

# Run claude install to set up launcher and shell integration
echo "Setting up Claude Code..."
"$binary_path" install ${TARGET:+"$TARGET"}

# Clean up downloaded file
rm -f "$binary_path"

if the binary failed - install.sh should, in turn, exit with a non-0 status and either emit nothing to stdout (because the binary already whined on failure) or only repeat the _"✘ Installation failed"_, not _"✅ Installation complete!"_ as it does today. see logs below.

Error Messages/Logs

$ wget -q  https://claude.ai/install.sh         # latest as of Dec 10, 2025
$ chmod u+x install.sh
$ ls -l install.sh 
    -rwxr--r-- 1 ubuntu ubuntu 4029  2025-12-10 16:39:52  install.sh*    

$ md5sum install.sh 
    1ddc72a5a9fe2b7c6411172dd985888c  install.sh

$ bash -x ./install.sh 2.0.63   # non-existent version number
    + set -e
    + TARGET=2.0.63
        ...
    + mkdir -p /home/ubuntu/.claude/downloads
    ++ download_file https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/stable
    ++ local url=https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/stable
    ++ local output=
    ++ '[' wget = curl ']'
    ++ '[' wget = wget ']'
    ++ '[' -n '' ']'
    ++ wget -q -O - https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/stable
    + version=2.0.64
    ++ download_file https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.0.64/manifest.json
        ...
    + wget -q -O /home/ubuntu/.claude/downloads/claude-2.0.64-linux-x64 https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.0.64/linux-x64/claude
    + '[' linux = darwin ']'
    ++ sha256sum /home/ubuntu/.claude/downloads/claude-2.0.64-linux-x64
    ++ cut '-d ' -f1
    + actual=751c40366be8188a7d316c0caa632ca0c2aa3c570e849763edca0866a8c7a231
    + '[' 751c40366be8188a7d316c0caa632ca0c2aa3c570e849763edca0866a8c7a231 '!=' 751c40366be8188a7d316c0caa632ca0c2aa3c570e849763edca0866a8c7a231 ']'
    + chmod +x /home/ubuntu/.claude/downloads/claude-2.0.64-linux-x64
    + echo 'Setting up Claude Code...'
    Setting up Claude Code...
    + /home/ubuntu/.claude/downloads/claude-2.0.64-linux-x64 install 2.0.63

    ✘ Installation failed

    Request failed with status code 404


    Try running with --force to override checks
    + rm -f /home/ubuntu/.claude/downloads/claude-2.0.64-linux-x64
    + echo ''

    + echo '✅ Installation complete!'
    ✅ Installation complete!
    + echo ''

$ echo $?
    0

Steps to Reproduce

the easiest and the most reliably reproducible way is to invoke install.sh on Linux with a non-existent version number as the target, e.g.:

wget -q  https://claude.ai/install.sh && \
    chmod u+x install.sh && \
    bash -x ./install.sh 2.0.63           # specify non-existent version number

however, install.sh will report success also on any other _failures_ that the native/binary install process might encounter.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.64

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

<img width="320" height="222" alt="Image" src="https://github.com/user-attachments/assets/e0c6c7f0-732f-46eb-b56f-ae6ed437fbe4" />

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗