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

Status Fixed / completed
Maintainer reply ✓ Yes — wolffiex
Activity 6 comments · opened Dec 10, 2025 · closed Dec 10, 2025
💡 Likely answer: A maintainer (wolffiex, collaborator) responded on this thread — see the highlighted reply below.

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 ↗

6 Comments

github-actions[bot] · 10 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/12044
  2. https://github.com/anthropics/claude-code/issues/9281

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

lev-lb · 10 months ago

nope, bot, neither of the 2 issues you found is the same as the bug described above.

wolffiex collaborator · 10 months ago

Thanks for the report, we'll get a fix for this in the next release

lev-lb · 10 months ago
Thanks for the report, we'll get a fix for this in the next release

@wolffiex : please clarify which release you had in mind when closing this ticket as "completed". because on v2.0.65 i'm still seeing:

#10 9.748 + echo 'Setting up Claude Code...'
#10 9.748 + /home/ubuntu/.claude/downloads/claude-2.0.65-linux-x64 install 2.0.63
#10 9.748 Setting up Claude Code...
#10 10.32 
#10 13.60 ✘ Installation failed
#10 13.60 
#10 13.60 Request failed with status code 404
#10 13.60 
#10 13.60 
#10 13.60 Try running with --force to override checks
#10 13.60 + rm -f /home/ubuntu/.claude/downloads/claude-2.0.65-linux-x64
#10 13.70 
#10 13.70 ✅ Installation complete!
#10 13.70 
#10 13.70 + echo ''
#10 13.70 + echo '✅ Installation complete!'
#10 13.70 + echo ''
#10 13.70 ===== install.sh status: 0
cailmdaley · 10 months ago

I am running into what may be a similar issue: curl -fsSL https://claude.ai/install.sh | bash reports success, but leaves behind no executable. What's more if I install with npm and then try to switch to native with claude install, I get similar behavior.

 ~ $ npm install -g @anthropic-ai/claude-code

changed 3 packages in 1s

2 packages are looking for funding
  run `npm fund` for details
 ~ $ claude install

✔ Claude Code successfully installed!

  Version: 2.0.67

  Location: ~/.local/bin/claude


  Next: Run claude --help to get started

⚠ Setup notes:
  • installMethod is native, but claude command not found at ~/.local/bin/claude

 ~ $ ls  ~/.local/bin/claude
ls: cannot access '/home/cdaley/.local/bin/claude': No such file or directory
 ~ $ claude
bash: ~/.nvm/versions/node/v24.11.1/bin/claude: No such file or directory

So claude install deletes the npm-installed executable as well. And importantly, auto-update fails and also deletes the executable, so I am finding that I constantly have to reinstall with npm.

github-actions[bot] · 9 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.