summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahul Iyer <[email protected]>2026-04-21 15:30:15 -0400
committerGitHub <[email protected]>2026-04-21 15:30:15 -0400
commitcd6415f332f53993d25f5371801cc46a123c6ef3 (patch)
tree971385539b11f8c1de167237b66e878f8064fd3a
parentc9fb8d0ce70b632d262bcb594793e5496d16b61a (diff)
downloadopencode-cd6415f332f53993d25f5371801cc46a123c6ef3.tar.gz
opencode-cd6415f332f53993d25f5371801cc46a123c6ef3.zip
fix(tui): don't check for version upgrades if it's disabled by the user (#20089)
Co-authored-by: Aiden Cline <[email protected]>
-rw-r--r--packages/opencode/src/cli/upgrade.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/opencode/src/cli/upgrade.ts b/packages/opencode/src/cli/upgrade.ts
index 7c6f08874..a3e3f3013 100644
--- a/packages/opencode/src/cli/upgrade.ts
+++ b/packages/opencode/src/cli/upgrade.ts
@@ -7,6 +7,7 @@ import { InstallationVersion } from "@/installation/version"
export async function upgrade() {
const config = await AppRuntime.runPromise(Config.Service.use((cfg) => cfg.getGlobal()))
+ if (config.autoupdate === false || Flag.OPENCODE_DISABLE_AUTOUPDATE) return
const method = await AppRuntime.runPromise(Installation.Service.use((svc) => svc.method()))
const latest = await AppRuntime.runPromise(Installation.Service.use((svc) => svc.latest(method))).catch(() => {})
if (!latest) return
@@ -17,7 +18,6 @@ export async function upgrade() {
}
if (InstallationVersion === latest) return
- if (config.autoupdate === false || Flag.OPENCODE_DISABLE_AUTOUPDATE) return
const kind = Installation.getReleaseType(InstallationVersion, latest)