refactor: remove special handling for upgrade command, simplify logic
统一对所有 cloud 子命令先 ensureCsCloud 再执行,移除对 upgrade 的特殊判断,逻辑更清晰简洁。 Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
This commit is contained in:
parent
bf62a5e118
commit
0dc1f67a04
|
|
@ -253,15 +253,6 @@ export async function cloudHandler(rawArgs: string[]): Promise<void> {
|
|||
process.exit(1)
|
||||
}
|
||||
|
||||
if (args[0] === "upgrade") {
|
||||
const bin = csCloudBin()
|
||||
if (fs.existsSync(bin)) {
|
||||
await runCsCloud(args)
|
||||
return
|
||||
}
|
||||
await ensureCsCloud()
|
||||
return
|
||||
}
|
||||
|
||||
await ensureCsCloud()
|
||||
await runCsCloud(args)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user