mirror of
https://fastgit.cc/https://github.com/anomalyco/opencode
synced 2026-04-23 18:36:59 +08:00
handle the optional v in upgrade command when using curl (#1500)
This commit is contained in:
@@ -32,7 +32,7 @@ export const UpgradeCommand = {
|
||||
return
|
||||
}
|
||||
prompts.log.info("Using method: " + method)
|
||||
const target = args.target ?? (await Installation.latest())
|
||||
const target = args.target ? args.target.replace(/^v/, "") : await Installation.latest()
|
||||
|
||||
if (Installation.VERSION === target) {
|
||||
prompts.log.warn(`opencode upgrade skipped: ${target} is already installed`)
|
||||
|
||||
Reference in New Issue
Block a user