Skip to content

Commit 2545dca

Browse files
fix: ccb update 使用 bun install -g @latest 替代 bun update -g
bun update -g 只更新到 package.json 版本范围内的最新版,无法跨版本升级。 改为 bun install -g @latest 与 npm 侧行为一致,强制拉取最新发布版。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 40fbc4a commit 2545dca

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/cli/updateCCB.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export async function updateCCB(): Promise<void> {
129129

130130
try {
131131
if (pkgManager === 'bun') {
132-
execSync(`bun update -g ${PACKAGE_NAME}`, {
132+
execSync(`bun install -g ${PACKAGE_NAME}@latest`, {
133133
stdio: 'inherit',
134134
cwd: homedir(),
135135
timeout: 120_000,
@@ -153,7 +153,9 @@ export async function updateCCB(): Promise<void> {
153153
process.stderr.write('\n')
154154
process.stderr.write('Try manually updating with:\n')
155155
if (pkgManager === 'bun') {
156-
process.stderr.write(chalk.bold(` bun update -g ${PACKAGE_NAME}`) + '\n')
156+
process.stderr.write(
157+
chalk.bold(` bun install -g ${PACKAGE_NAME}@latest`) + '\n',
158+
)
157159
} else {
158160
process.stderr.write(
159161
chalk.bold(` npm install -g ${PACKAGE_NAME}@latest`) + '\n',

0 commit comments

Comments
 (0)