From cd6415f332f53993d25f5371801cc46a123c6ef3 Mon Sep 17 00:00:00 2001 From: Rahul Iyer <4255590+rahuliyer95@users.noreply.github.com> Date: Tue, 21 Apr 2026 15:30:15 -0400 Subject: [PATCH] fix(tui): don't check for version upgrades if it's disabled by the user (#20089) Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> --- packages/opencode/src/cli/upgrade.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/cli/upgrade.ts b/packages/opencode/src/cli/upgrade.ts index 7c6f08874b..a3e3f3013d 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)