Просмотр исходного кода

handle the optional `v` in upgrade command when using curl (#1500)

CodinCat 6 месяцев назад
Родитель
Сommit
510fe8a72a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/opencode/src/cli/cmd/upgrade.ts

+ 1 - 1
packages/opencode/src/cli/cmd/upgrade.ts

@@ -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`)