mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-22 08:15:53 +00:00
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>
This commit is contained in:
@@ -129,7 +129,7 @@ export async function updateCCB(): Promise<void> {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (pkgManager === 'bun') {
|
if (pkgManager === 'bun') {
|
||||||
execSync(`bun update -g ${PACKAGE_NAME}`, {
|
execSync(`bun install -g ${PACKAGE_NAME}@latest`, {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
cwd: homedir(),
|
cwd: homedir(),
|
||||||
timeout: 120_000,
|
timeout: 120_000,
|
||||||
@@ -153,7 +153,9 @@ export async function updateCCB(): Promise<void> {
|
|||||||
process.stderr.write('\n')
|
process.stderr.write('\n')
|
||||||
process.stderr.write('Try manually updating with:\n')
|
process.stderr.write('Try manually updating with:\n')
|
||||||
if (pkgManager === 'bun') {
|
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 {
|
} else {
|
||||||
process.stderr.write(
|
process.stderr.write(
|
||||||
chalk.bold(` npm install -g ${PACKAGE_NAME}@latest`) + '\n',
|
chalk.bold(` npm install -g ${PACKAGE_NAME}@latest`) + '\n',
|
||||||
|
|||||||
Reference in New Issue
Block a user