From 2545dcabfdf1f43c845b23b12e88ea39be0345e4 Mon Sep 17 00:00:00 2001 From: claude-code-best Date: Sun, 3 May 2026 19:28:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20ccb=20update=20=E4=BD=BF=E7=94=A8=20bun?= =?UTF-8?q?=20install=20-g=20@latest=20=E6=9B=BF=E4=BB=A3=20bun=20update?= =?UTF-8?q?=20-g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bun update -g 只更新到 package.json 版本范围内的最新版,无法跨版本升级。 改为 bun install -g @latest 与 npm 侧行为一致,强制拉取最新发布版。 Co-Authored-By: Claude Opus 4.7 --- src/cli/updateCCB.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cli/updateCCB.ts b/src/cli/updateCCB.ts index 83731c59f..166d6f0c0 100644 --- a/src/cli/updateCCB.ts +++ b/src/cli/updateCCB.ts @@ -129,7 +129,7 @@ export async function updateCCB(): Promise { try { if (pkgManager === 'bun') { - execSync(`bun update -g ${PACKAGE_NAME}`, { + execSync(`bun install -g ${PACKAGE_NAME}@latest`, { stdio: 'inherit', cwd: homedir(), timeout: 120_000, @@ -153,7 +153,9 @@ export async function updateCCB(): Promise { process.stderr.write('\n') process.stderr.write('Try manually updating with:\n') if (pkgManager === 'bun') { - process.stderr.write(chalk.bold(` bun update -g ${PACKAGE_NAME}`) + '\n') + process.stderr.write( + chalk.bold(` bun install -g ${PACKAGE_NAME}@latest`) + '\n', + ) } else { process.stderr.write( chalk.bold(` npm install -g ${PACKAGE_NAME}@latest`) + '\n',