From 2ababb4d2443cee3762a27870f57660005e3a1ef Mon Sep 17 00:00:00 2001 From: amanthanvi Date: Mon, 31 Aug 2026 18:41:27 -0400 Subject: [PATCH] fix: update Claude from latest channel --- CHANGELOG.md | 4 ++++ README.md | 2 +- SPEC.md | 4 ++-- tests/test_cli.sh | 4 +++- tests/test_windows_native.ps1 | 4 ++-- updates | 4 ++-- updates-main.ps1 | 2 +- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c11f052..c99789a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/). - `skills` module on Bash and native Windows: updates agent skills in both project and global scopes via `skills update --project --global` (matching the interactive "Both" option without prompting), falling back to `npx --yes skills update` when the `skills` CLI is not installed; `--non-interactive` appends `--yes` to skip upstream-deletion prompts. +### Changed + +- Update Claude Code from the latest release channel explicitly with `claude update latest` on Bash and native Windows. + ## [2.1.3] - 2026-08-10 ### Fixed diff --git a/README.md b/README.md index 17cf172..dae0e38 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Modules are auto-detected: if the underlying command isn’t installed, the modu - `mas`: upgrade Mac App Store apps via `mas` (disabled by default; enable with `--mas-upgrade` or `--full`) - `pipx`: upgrade pipx-managed apps via `pipx upgrade-all` - `rustup`: update Rust toolchains via `rustup update` -- `claude`: update Claude Code CLI via `claude update` +- `claude`: update Claude Code CLI to the latest channel via `claude update latest` - `pi`: update the pi AI CLI and installed extensions via `pi update --all` - `skills`: update agent skills in both project and global scopes via `skills update` (falls back to `npx --yes skills update`); passing both scopes matches the interactive "Both" option without prompting - `mise`: update mise and upgrade installed tools (`mise self-update`, `mise upgrade`) diff --git a/SPEC.md b/SPEC.md index 17e8767..bec17f5 100644 --- a/SPEC.md +++ b/SPEC.md @@ -360,7 +360,7 @@ Execution order: `brew`, `shell`, `repos`, `linux`, `winget`, `node`, `bun`, `py | `mas` | Yes | No | No | No | Requires `mas` (opt-in) | | `pipx` | Yes | Yes | Yes | Yes | Requires `pipx` | | `rustup` | Yes | Yes | Yes | Yes | Requires `rustup` | -| `claude` | Yes | Yes | Yes | Yes | Requires `claude`; runs `claude update` | +| `claude` | Yes | Yes | Yes | Yes | Requires `claude`; runs `claude update latest` | | `pi` | Yes | Yes | Yes | Yes | Requires `pi`; runs `pi update --all` | | `skills` | Yes | Yes | Yes | Yes | Requires `skills` or `npx`; runs `skills update` for project + global scopes | | `mise` | Yes | Yes | Yes | No | Requires `mise` | @@ -551,7 +551,7 @@ Purpose: update Rust toolchains. Purpose: update the Claude Code CLI. - Requires: `claude` -- Non-dry-run: `claude update` +- Non-dry-run: `claude update latest` - Side effects: updates the Claude Code CLI. ### 8.14 `pi` diff --git a/tests/test_cli.sh b/tests/test_cli.sh index 24bc7af..dabe254 100755 --- a/tests/test_cli.sh +++ b/tests/test_cli.sh @@ -1733,7 +1733,9 @@ UPDATES_TEST_CASE run_test "claude module logs correct commands" <<'UPDATES_TEST_CASE' : >"$CALL_LOG" "$SCRIPT" --only claude --no-emoji >/dev/null -grep -q '^claude update$' "$CALL_LOG" +grep -q '^claude update latest$' "$CALL_LOG" +out="$("$SCRIPT" --only claude --dry-run --no-emoji)" +echo "$out" | grep -q '^DRY RUN: claude update latest$' UPDATES_TEST_CASE diff --git a/tests/test_windows_native.ps1 b/tests/test_windows_native.ps1 index 6c0245c..e9e1cb5 100644 --- a/tests/test_windows_native.ps1 +++ b/tests/test_windows_native.ps1 @@ -2136,7 +2136,7 @@ if (Should-RunTest 'native payload runs Claude and Pi update modules') { $result = Invoke-Bootstrap -InstallRoot $installRoot -ArgumentList @('--no-self-update', '--only', 'claude,pi', '--no-emoji', '--no-color') -Environment @{ PATH = $stubDir } Assert-Equal -Expected 0 -Actual $result.ExitCode -Message "Claude/Pi modules should succeed`n$($result.Output)" $calls = Get-Content -LiteralPath $log -Raw - Assert-Match -Text $calls -Pattern '(?m)^claude:update\s*$' -Message 'Claude module should run claude update' + Assert-Match -Text $calls -Pattern '(?m)^claude:update latest\s*$' -Message 'Claude module should run claude update latest' Assert-Match -Text $calls -Pattern '(?m)^pi:update --all\s*$' -Message 'Pi module should run pi update --all' } } @@ -2163,7 +2163,7 @@ if (Should-RunTest 'native Claude and Pi modules cover missing dry-run failure s $dry = Invoke-Bootstrap -InstallRoot $installRoot -ArgumentList @('--no-self-update', '--only', 'claude,pi', '--dry-run', '--no-emoji') -Environment @{ PATH = $stubDir } Assert-Equal -Expected 0 -Actual $dry.ExitCode -Message 'Claude/Pi dry-run should succeed' Assert-True -Condition (-not (Test-Path -LiteralPath $log)) -Message 'Claude/Pi dry-run must not invoke commands' - Assert-Match -Text $dry.Output -Pattern '(?i)DRY RUN: .*claude(\.cmd)? update' -Message 'Claude dry-run command should be visible' + Assert-Match -Text $dry.Output -Pattern '(?i)DRY RUN: .*claude(\.cmd)? update latest' -Message 'Claude dry-run command should target the latest channel' Assert-Match -Text $dry.Output -Pattern '(?i)DRY RUN: .*pi(\.cmd)? update' -Message 'Pi dry-run command should be visible' Write-Utf8NoBom -Path (Join-Path $stubDir 'claude.cmd') -Content "@echo off`r`necho claude-failed`r`nexit /b 7`r`n" diff --git a/updates b/updates index 48138e2..d5b3093 100755 --- a/updates +++ b/updates @@ -3651,11 +3651,11 @@ module_claude() { ensure_cmd_or_skip claude claude || return $? if [ "$DRY_RUN" -eq 1 ]; then - log "DRY RUN: claude update" + log "DRY RUN: claude update latest" return 0 fi - run claude update || return 1 + run claude update latest || return 1 return 0 } diff --git a/updates-main.ps1 b/updates-main.ps1 index fab44b5..45a1954 100644 --- a/updates-main.ps1 +++ b/updates-main.ps1 @@ -1353,7 +1353,7 @@ function Invoke-ModuleClaude { if (-not $claude) { return (Resolve-MissingDependency -ModuleName 'claude' -Detail 'claude not found.') } - $result = Invoke-LoggedProcess -FilePath $claude -ArgumentList @('update') + $result = Invoke-LoggedProcess -FilePath $claude -ArgumentList @('update', 'latest') if ($result.ExitCode -ne 0) { Write-ErrorLine 'claude: update failed' return 1