mirror of
https://github.com/sst/opencode.git
synced 2025-07-07 16:14:59 +00:00
fix: Skip opencode upgrade if same version (#720)
This commit is contained in:
parent
f4c453155d
commit
2446483df5
1 changed files with 9 additions and 0 deletions
|
@ -35,6 +35,15 @@ export const UpgradeCommand = {
|
|||
}
|
||||
prompts.log.info("Using method: " + method)
|
||||
const target = args.target ?? (await Installation.latest())
|
||||
|
||||
if (Installation.VERSION === target) {
|
||||
prompts.log.warn(
|
||||
`opencode upgrade skipped: ${target} is already installed`,
|
||||
)
|
||||
prompts.outro("Done")
|
||||
return
|
||||
}
|
||||
|
||||
prompts.log.info(`From ${Installation.VERSION} → ${target}`)
|
||||
const spinner = prompts.spinner()
|
||||
spinner.start("Upgrading...")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue