fix: update Claude from latest channel - #17
amanthanvi wants to merge 1 commit into
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR changes Claude updates on Bash and native Windows to invoke Sequence diagram for updating Claude from the latest channelsequenceDiagram
participant User
participant BashUpdates
participant WindowsUpdates
participant ClaudeCLI
alt Bash implementation
User->>BashUpdates: run updates
BashUpdates->>ClaudeCLI: claude update latest
ClaudeCLI-->>BashUpdates: exit status
else Native Windows implementation
User->>WindowsUpdates: run updates
WindowsUpdates->>ClaudeCLI: update latest
ClaudeCLI-->>WindowsUpdates: ExitCode
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 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. Comment |
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the channel selection is wrong, the command can install an unintended Claude Code version that persists after this change is reverted and may affect subsequent CLI runs. The installation can generally be repaired by reinstalling or updating to the intended version, so the impact is bounded rather than irreversible.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
| fi | ||
|
|
||
| run claude update || return 1 | ||
| run claude update latest || return 1 |
There was a problem hiding this comment.
Claude update command includes an unsupported operand
claude update does not accept a release-channel positional argument. This invocation runs claude update latest, which exits with an unexpected-argument error and causes the selected Claude update to fail. updates-main.ps1 constructs the same @('update', 'latest') argument list, so native Windows has the same behavior. Remove latest from both invocations and update the dry-run and fixture expectations to assert claude update.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: updates
Line: 3658
Comment:
**Claude update command includes an unsupported operand**
`claude update` does not accept a release-channel positional argument. This invocation runs `claude update latest`, which exits with an unexpected-argument error and causes the selected Claude update to fail. `updates-main.ps1` constructs the same `@('update', 'latest')` argument list, so native Windows has the same behavior. Remove `latest` from both invocations and update the dry-run and fixture expectations to assert `claude update`.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
claude update latestinstead ofclaude updateon Bash and native WindowsVerification
Passed:
./tests/test_cli.sh "claude module logs correct commands"bash -n,shellcheck, andshfmtchecks forupdatesupdates-main.ps1andtests/test_windows_native.ps1git diff --checkBaseline-only local failures, reproduced unchanged from
origin/main:./scripts/lint.sh: localshfmtwants to reformat the existing Python heredoc condition intests/test_cli.sh./scripts/test.sh: existingINT exits 130 and terminates active childfixture does not create its PID file on this hostThe latest CI run for the base commit is green.
Summary by Sourcery
Update Claude Code using the latest release channel across supported implementations.
Bug Fixes:
Documentation:
Tests: