Skip to content

feat: migrate Claude Code installation from npm to native installer - #427

Merged
keito4 merged 2 commits into
mainfrom
chore/422-update-claude-code-installation
Feb 2, 2026
Merged

feat: migrate Claude Code installation from npm to native installer#427
keito4 merged 2 commits into
mainfrom
chore/422-update-claude-code-installation

Conversation

@keito4

@keito4 keito4 commented Feb 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Claude Codeのインストール方法をnpm経由からネイティブインストーラーへ移行
  • Dockerfileでhttps://claude.ai/install.shを使用してClaude Codeをインストール
  • update-claude-code.shスクリプトをclaude updateコマンドベースに変更
  • npm/global.jsonから@anthropic-ai/claude-codeを削除
  • 関連ドキュメント(README.md、コマンドドキュメント)を更新

Test plan

  • DevContainerビルドが成功することを確認
  • Claude Codeが正しくインストールされることを確認
  • claude updateコマンドが動作することを確認
  • /update-claude-codeコマンドが正常に動作することを確認

Related

Closes #422

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Simplified Claude Code installation and update workflows by transitioning from npm-based package management to a native installer approach.
    • Updated development container base image.
  • Documentation

    • Revised Claude Code setup and update guidance with streamlined, user-friendly instructions including installation and auto-update options.

- Replace npm installation with curl-based native installer
- Update Dockerfile to use https://claude.ai/install.sh
- Modify update-claude-code.sh to use `claude update` command
- Remove @anthropic-ai/claude-code from npm/global.json
- Update documentation to reflect new installation method
- Bump devcontainer image to 1.62.2

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Feb 2, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@keito4 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 33 minutes and 8 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

The changes migrate Claude Code installation and updates from npm-based management to a native Claude installer. Configuration files, documentation, installation scripts, and dependency declarations are updated to reflect this shift away from npm and toward the native installation approach.

Changes

Cohort / File(s) Summary
Installation & Setup Documentation
.claude/commands/update-claude-code.md, README.md
Updated installation and update instructions to replace npm-based flow with native Claude installer via claude update command; added curl install guidance and reference links.
DevContainer Installation
.devcontainer/Dockerfile
Replaced npm installation of Claude Code with curl-based native installer; removed claude-code from npm install command; added PATH update for Claude's local bin directory.
DevContainer Configuration
.devcontainer/devcontainer.json
Updated base container image tag from 1.62.1 to 1.62.2.
Dependency Management
npm/global.json
Removed @anthropic-ai/claude-code from npm dependencies; other global npm packages retained.
Update Script
script/update-claude-code.sh
Replaced npm version retrieval and update logic with native Claude CLI flow; now uses claude --version for version detection, claude update for updates, and fallback curl reinstall on failure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

size/S

Poem

🐰 No more npm, just native ways,
Claude now hops through cleaner days,
With claude update quick and spry,
This bunny's scripts can now fly high! 🎉

🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR updates devcontainer.json base image tag (1.62.1 to 1.62.2), which is not mentioned in issue #422 objectives and appears to be an unrelated change. Either document the reason for the devcontainer.json base image update or remove it from this PR if it's unrelated to the Claude Code migration effort.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: migrating Claude Code installation from npm to native installer, which is the core focus across all modified files.
Linked Issues check ✅ Passed The PR successfully addresses all coding objectives from issue #422: replaces npm-based installation with native installer in Dockerfile and scripts, updates update-claude-code.sh with claude update command, removes Claude Code from npm/global.json, and updates documentation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/422-update-claude-code-installation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@keito4

keito4 commented Feb 2, 2026

Copy link
Copy Markdown
Owner Author

🔍 AI Code Review (Local Hook)

Models: Codex (gpt-5.2-codex) / Gemini (gemini-2.5-pro)

🤖 Codex Review

Findings

  • Dockerfile installs Claude Code as root but exports PATH for the vscode home, likely leaving the vscode user without a claude binary. The installer typically writes to $HOME/.claude/...; with USER root, $HOME is /root, while PATH is set to /home/vscode/.claude/.... This will make claude unavailable for the default user in the container. Consider running the installer as vscode, or set PATH to /root/.claude/local/bin (and/or install into /home/vscode). /.devcontainer/Dockerfile:68-70
  • New use of curl | bash in the Docker build introduces an unverified remote script execution in the image build. This is a supply‑chain risk and should be mitigated (pin a versioned URL, verify checksum/signature, or vendor the script). /.devcontainer/Dockerfile:68-70

Verdict
patch is incorrect — the devcontainer likely ends up without a working claude CLI for the default vscode user, breaking the intended workflow. Confidence: 0.63

✨ Gemini Review

Here is my review of the proposed code change.

Findings

  • [Correctness] claude CLI is installed as the wrong user in the dev container.
    • File: .devcontainer/Dockerfile
    • Lines: 68-69
    • Explanation: The installation curl -fsSL https://claude.ai/install.sh | bash is executed as the root user (due to USER root on line 65). The install script will likely place files in the /root home directory. However, the container's primary user is vscode, and the subsequent PATH modification is for /home/vscode/.bashrc. As a result, the claude command will not be available to the vscode user. The installation should be run as the vscode user.

Verdict

  • Overall: patch is incorrect
  • Justification: The patch breaks the dev container build by installing the claude CLI for the root user instead of the vscode user, which makes the tool unusable for developers. The other changes correctly migrate from an npm-based installation to a native one, but the Dockerfile bug is critical.
  • Confidence: 1.0

⚠️ 修正が必要です

上記のレビューで問題が指摘されています。修正してからマージしてください。


🤖 Generated by post_pr_ai_review.py hook

@claude

claude Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

PR Review - Claude Code Native Installer Migration

概要

このPRはClaude Codeのインストールをnpmからネイティブインストーラーへ移行する変更です。Issue #422の要件を適切に実装しています。


✅ 良い点

1. 包括的な実装

  • Dockerfile、更新スクリプト、ドキュメントを一貫して更新
  • npm/global.jsonから@anthropic-ai/claude-codeを削除し、整合性を確保
  • 関連するすべてのドキュメント(README.md、コマンドドキュメント)を更新

2. エラーハンドリングの改善

script/update-claude-code.sh:37-52では、claude updateが失敗した場合に再インストールを試みるフォールバック機構を実装しており、堅牢性が向上しています。

3. シンプル化

更新スクリプトが大幅に簡素化され(58行から59行へ)、jqやnpm registryへの依存がなくなり、保守性が向上しました。


🔍 改善提案

1. Dockerfile: ユーザーコンテキストの問題(重要)

.devcontainer/Dockerfile:69-70で、RUNコマンドをrootユーザーで実行していますが、Claude Codeはvscodeユーザーのホームディレクトリ(~/.claude/local/bin)にインストールされます。

問題点:

USER root
# この時点でHOME=/root になる
RUN curl -fsSL https://claude.ai/install.sh | bash \
 && echo 'export PATH="$HOME/.claude/local/bin:$PATH"' >> /home/vscode/.bashrc

推奨修正:

USER vscode
RUN curl -fsSL https://claude.ai/install.sh | bash \
 && echo 'export PATH="$HOME/.claude/local/bin:$PATH"' >> ~/.bashrc

または、rootユーザーとして実行する場合はHOME環境変数を明示的に設定:

USER root
RUN HOME=/home/vscode curl -fsSL https://claude.ai/install.sh | bash \
 && chown -R vscode:vscode /home/vscode/.claude

2. セキュリティ: インストールスクリプトの検証

curl | bashパターンはセキュリティリスクがあります。本番環境では以下の対策を検討してください:

推奨:

# スクリプトをダウンロードして検証してからインストール
curl -fsSL https://claude.ai/install.sh -o /tmp/claude-install.sh
# チェックサムまたは署名検証(可能であれば)
bash /tmp/claude-install.sh
rm /tmp/claude-install.sh

または、インストールスクリプトをリポジトリにコミットして内容を固定する方法も検討できます。

3. エラーメッセージの改善

script/update-claude-code.sh:31で、claude --versionが失敗した場合に"unknown"を表示していますが、より詳細な情報があると診断に役立ちます。

推奨:

current_version=$(claude --version 2>&1 | head -1 || echo "インストールされていないか、パスが通っていません")

4. テストカバレッジ

PRのテストプランに以下を追加することを推奨します:

  • DevContainerビルド後、which claudeでパスが正しく通っていることを確認
  • claude --versionが正常に動作することを確認
  • script/update-claude-code.shを実行して更新が正常に動作することを確認

🐛 潜在的な問題

5. Dockerfile行69: PATH設定の問題

export PATH="$HOME/.claude/local/bin:$PATH"を.bashrcに追加していますが、$HOMEは実行時に展開されるため、rootユーザーとして実行した場合、/root/.claude/local/binが設定される可能性があります。

検証が必要:

  • コンテナ起動後、vscodeユーザーとしてecho $PATHを実行し、正しいパスが含まれているか確認

📝 ドキュメント

6. マイグレーション手順の追加

既存ユーザー向けに、npm版からネイティブ版への移行手順をREADMEまたはCHANGELOGに記載することを推奨します。

例:

## Migration from npm to Native Installer

既存のnpm版をアンインストールし、ネイティブインストーラーに移行してください:

\`\`\`bash
# npm版をアンインストール
npm uninstall -g @anthropic-ai/claude-code

# ネイティブ版をインストール
curl -fsSL https://claude.ai/install.sh | bash
\`\`\`

🎯 総合評価

観点 評価 コメント
コード品質 ⭐⭐⭐⭐ シンプルで保守性が高い
ベストプラクティス ⭐⭐⭐ ユーザーコンテキストとセキュリティに改善の余地
バグの可能性 ⭐⭐⭐ Dockerfile のユーザーコンテキスト問題要確認
パフォーマンス ⭐⭐⭐⭐⭐ npm registryへの依存削減で高速化
セキュリティ ⭐⭐⭐ curl|bash パターンに改善の余地
テストカバレッジ ⭐⭐⭐ 手動テストプランはあるが自動化なし
ドキュメント ⭐⭐⭐⭐ 適切に更新されている

🚀 推奨アクション

必須(マージ前)

  1. Dockerfileのユーザーコンテキスト問題を修正 - インストールがvscodeユーザーで実行されることを確認

推奨(マージ後でも可)

  1. セキュリティ強化: curl|bashパターンの改善
  2. エラーメッセージの詳細化
  3. 既存ユーザー向けマイグレーション手順の追加
  4. 自動化されたテストの追加

✅ 承認条件

Dockerfileのユーザーコンテキスト問題(改善提案#1)を修正後、承認可能です。その他の提案は優先度が低いため、別PRでの対応でも問題ありません。

全体として、npmからネイティブインストーラーへの移行という重要な変更を適切に実装しており、コードの簡素化にも貢献しています。👍


参考:

- Update post_pr_ai_review.py prompts to output in Japanese
- Update codex-review.md skill prompt to Japanese
- Ensures Codex and Gemini review comments on PRs are in Japanese

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

🔍 PRレビュー結果

📊 変更概要

Claude Codeのインストール方法をnpm経由からネイティブインストーラーへ移行する変更です。

変更規模: +85行 / -113行 (8ファイル変更)
CI状況: 主要チェック成功 ✅


✅ 良い点

  1. 適切な移行戦略

    • npmベースからネイティブインストーラーへの移行は、公式の推奨方向に沿っています
    • 既存の構造を壊さずに段階的に移行できています
  2. 包括的なドキュメント更新

    • README.md、コマンドドキュメント、スキルファイルすべてで一貫した更新がされています
    • インストール手順が明確に記載されています
  3. エラーハンドリングの改善

    • script/update-claude-code.sh:45-52 で、claude update失敗時の再インストールフォールバックが実装されています
    • これにより堅牢性が向上しています
  4. 日本語化の統一

    • AIレビュープロンプトが日本語に統一され、チーム内での理解が容易になります

⚠️ 潜在的な問題と改善提案

🔴 Critical: Dockerfileのインストールロジックに問題

.devcontainer/Dockerfile:69-70 で重大な問題があります

問題点:

  • USER rootの状態でインストールを実行しているため、HOMEは/rootを指します
  • しかし、.bashrcへのPATH追加は/home/vscode/.bashrcに対して行われています
  • この不一致により、Claude Codeが/root/.claude/local/binにインストールされるが、vsCodeユーザーはそれにアクセスできません

推奨修正: vsCodeユーザーとしてインストールするか、rootで実行する場合は明示的にHOME=/home/vscodeを設定してください

🟡 Medium: テストカバレッジ不足

PRのTest Planにある項目がすべて未チェックです。マージ前に実際のビルドテストを実行し、チェックボックスを更新してください。特にDockerfileの問題を考慮すると、実際のビルドテストは必須です。

🟡 Medium: 既存環境での移行パス

既にconfig-baseを使用している開発者がイメージを更新した際、npm版のClaude Codeが残り、ネイティブ版と競合する可能性があります。移行ガイドやnpm uninstall手順をドキュメントに追加することを推奨します。


🔒 セキュリティ

✅ 問題なし: curl -fsSL https://claude.ai/install.sh の使用は公式推奨の方法で、適切なエラーハンドリングとHTTPS通信が行われています。


📝 総合評価

Verdict: Patch requires fixes before merge
Confidence: 0.85

理由:

  1. Critical Issue: Dockerfileのユーザー権限問題により、実際にはClaude Codeが正しくインストールされない可能性が高いです
  2. テストプランが未実行のため、実際の動作確認が不足しています

✅ 推奨アクション (マージ前に必須)

  1. Dockerfileの修正 (.devcontainer/Dockerfile:69-70)

    • vsCodeユーザーとしてClaude Codeをインストールするよう修正
  2. 実際のテスト実行

    • DevContainerを実際にビルドして動作確認
    • claude --version と claude update の動作確認
    • テストプランのチェックボックスを更新

この変更の方向性は正しく、ドキュメントも丁寧に更新されています。Dockerfileの権限問題を修正し、実際のテストを実行すれば、安全にマージできる状態になります。

お疲れ様でした!💪

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @.devcontainer/Dockerfile:
- Around line 68-71: The installer is run as root so Claude is installed into
/root/.local/bin and the PATH appended points to the wrong directory; run the
installer as the vscode user (or set HOME=/home/vscode when invoking the
installer) so the binary installs to /home/vscode/.local/bin, then append the
correct PATH entry ($HOME/.local/bin) to the vscode user's shell rc (use
/home/vscode/.bashrc) and ensure ownership of installed files is vscode; look
for the RUN curl...| bash invocation and the echo 'export
PATH=...'/home/vscode/.bashrc to update invocation user, HOME, PATH target, and
file ownership (chown) accordingly.

In `@script/update-claude-code.sh`:
- Around line 23-52: Do not rely on the exit code of claude update; instead
capture versions and compare them to decide whether an update/reinstall is
needed: record current_version using the existing current_version command, run
claude update (but ignore its exit code), then fetch new_version with the same
claude --version call and compare current_version vs new_version to determine
success or whether to reinstall; optionally capture the stdout/stderr of the
claude update invocation to include in log_warn/log_info messages but never
branch solely on the exit status of claude update.

Comment thread .devcontainer/Dockerfile
Comment on lines +68 to +71
# Install Claude Code using native installer (npm installation deprecated)
RUN curl -fsSL https://claude.ai/install.sh | bash \
&& echo 'export PATH="$HOME/.claude/local/bin:$PATH"' >> /home/vscode/.bashrc

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Claude Code native installer install.sh behavior root vs non-root HOME directory

💡 Result:

Claude Code’s native installer script (the curl …/install.sh | bash flow) installs into the invoking user’s home directory—it is **not a system-wide (/usr/local) installer.

  • The script “adds a symlink to the installation at ~/.local/bin/claude”. That ~ resolves from $HOME of the user running the script. So:

    • Run normally (non-root): installs under your user’s home, e.g. ~/.local/bin/claude. [1]
    • Run with sudo / as root: installs under root’s home, e.g. /root/.local/bin/claude, and your normal user won’t see it in their ~/.local/bin (unless you also adjust PATH). (This is the direct consequence of the installer targeting ~/.local/bin.) [1]
  • The installer may print setup notes about adding ~/.local/bin to PATH; issues have been reported around the exact PATH snippet it prints, reinforcing that it’s managing a per-user ~/.local/bin install rather than a global one. [2]

If you accidentally installed as root and want it under a specific user, rerun it as that user (or use something like sudo -u <user> -H bash -c 'curl -fsSL https://claude.ai/install.sh | bash' so HOME is the target user’s home).

Sources:
[1] Claude Code troubleshooting docs (native installer symlink location ~/.local/bin/claude, and local migration notes)
[2] GitHub issue reporting the installer’s PATH guidance for ~/.local/bin (shows installer’s per-user PATH expectations)


Install Claude Code as vscode to avoid HOME/path mismatch.

The installer runs as root, but the PATH is appended for /home/vscode. The native installer installs to ~/.local/bin (resolved from the invoking user's $HOME), so running it as root installs to /root/.local/bin. This binary is inaccessible to the vscode user. Additionally, the PATH variable in the original code ($HOME/.claude/local/bin) doesn't match the installer's actual output location ($HOME/.local/bin).

Proposed fix
 # Install Claude Code using native installer (npm installation deprecated)
+USER vscode
 RUN curl -fsSL https://claude.ai/install.sh | bash \
  && echo 'export PATH="$HOME/.local/bin:$PATH"' >> /home/vscode/.bashrc
+USER root
🤖 Prompt for AI Agents
In @.devcontainer/Dockerfile around lines 68 - 71, The installer is run as root
so Claude is installed into /root/.local/bin and the PATH appended points to the
wrong directory; run the installer as the vscode user (or set HOME=/home/vscode
when invoking the installer) so the binary installs to /home/vscode/.local/bin,
then append the correct PATH entry ($HOME/.local/bin) to the vscode user's shell
rc (use /home/vscode/.bashrc) and ensure ownership of installed files is vscode;
look for the RUN curl...| bash invocation and the echo 'export
PATH=...'/home/vscode/.bashrc to update invocation user, HOME, PATH target, and
file ownership (chown) accordingly.

Comment on lines +23 to 52
# claudeコマンドの存在確認
if ! command -v claude &> /dev/null; then
log_error "Claude CLI が見つかりません。"
log_info "インストール方法: curl -fsSL https://claude.ai/install.sh | bash"
exit 1
fi

# 現在のバージョンを取得
current_version=$(jq -r ".dependencies[\"${PACKAGE}\"].version" "$GLOBAL_FILE")
current_version=$(claude --version 2>/dev/null | head -1 || echo "unknown")
log_info "現在のバージョン: ${current_version}"

# 最新バージョンを取得
log_info "最新バージョンを確認中..."
latest_version=$(npm view "$PACKAGE" version 2>/dev/null)

if [[ -z "$latest_version" ]]; then
log_error "最新バージョンの取得に失敗しました"
exit 1
fi

log_info "最新バージョン: ${latest_version}"

# バージョン比較
if [[ "$current_version" == "$latest_version" ]]; then
log_success "Claude Code は既に最新バージョンです (${current_version})"
exit 0
fi
# 更新を実行
log_info "Claude Code を更新中..."

log_warn "バージョンが異なります: ${current_version} → ${latest_version}"

# 更新するかどうかを確認(CI環境では自動的に更新)
if [[ "${CI:-false}" != "true" ]] && [[ "${AUTO_UPDATE:-false}" != "true" ]]; then
read -p "更新しますか? (y/N): " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
log_info "更新をキャンセルしました"
exit 0
if claude update; then
new_version=$(claude --version 2>/dev/null | head -1 || echo "unknown")
if [[ "$current_version" == "$new_version" ]]; then
log_success "Claude Code は既に最新バージョンです (${current_version})"
else
log_success "Claude Code を ${current_version} → ${new_version} に更新しました"
fi
else
log_warn "claude update に失敗しました。再インストールを試みます..."
if curl -fsSL https://claude.ai/install.sh | bash; then
new_version=$(claude --version 2>/dev/null | head -1 || echo "unknown")
log_success "Claude Code を再インストールしました (${new_version})"
else
log_error "Claude Code の更新に失敗しました"
exit 1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

claude update exit code behavior already up to date

💡 Result:

Anthropic’s docs confirm claude update exists (and is the recommended manual update path when auto-updates fail), but they do not document any “exit code contract” for the command—specifically, there’s no guarantee spelled out for what exit code you get when it reports “already up to date.” [1] [2]

Practical workaround (don’t rely on the exit code):

  • Treat “already up to date” as a successful outcome in your wrapper script, and verify via version comparison.

Example (bash):

set -euo pipefail

before="$(claude --version | head -n1)"
out="$(claude update 2>&1 || true)"
after="$(claude --version | head -n1)"

if grep -qiE 'already up to date|no updates' <<<"$out"; then
  exit 0
fi

# If it changed, also success
if [[ "$before" != "$after" ]]; then
  exit 0
fi

# Otherwise treat as failure (unexpected state)
echo "$out" >&2
exit 1

If you’re seeing “update available” prompts but Homebrew says everything is already up to date, that mismatch is a known/recurring packaging sync issue (brew lagging behind other release channels), so version-checking is especially important. [3]

Sources

  1. Claude Code docs (“Set up Claude Code” → manual update: claude update). [1]
  2. Claude Code troubleshooting (“Auto-updater issues” → “Update manually: Run claude update”). [2]
  3. GitHub issue: Claude indicates an update via brew, but brew upgrade reports already up to date. [3]

The script's reliance on claude update exit code is unreliable.

Anthropic does not document the exit code contract for claude update, so there is no guarantee what exit code is returned when already up to date. If claude update returns non-zero when already at the latest version (undocumented behavior), the script will incorrectly fall into the else block and trigger an unnecessary reinstallation. Compare versions before branching on the exit code, or capture the output and check for "already up to date" messages to avoid relying on the undocumented exit code behavior.

🤖 Prompt for AI Agents
In `@script/update-claude-code.sh` around lines 23 - 52, Do not rely on the exit
code of claude update; instead capture versions and compare them to decide
whether an update/reinstall is needed: record current_version using the existing
current_version command, run claude update (but ignore its exit code), then
fetch new_version with the same claude --version call and compare
current_version vs new_version to determine success or whether to reinstall;
optionally capture the stdout/stderr of the claude update invocation to include
in log_warn/log_info messages but never branch solely on the exit status of
claude update.

@keito4
keito4 merged commit ac0d8c9 into main Feb 2, 2026
20 checks passed
@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.63.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released リリース済み

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: Update Claude Code installation method from npm to native installer

1 participant