Skip to content

Commit cd6415f

Browse files
fix(tui): don't check for version upgrades if it's disabled by the user (#20089)
Co-authored-by: Aiden Cline <[email protected]>
1 parent c9fb8d0 commit cd6415f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/opencode/src/cli/upgrade.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { InstallationVersion } from "@/installation/version"
77

88
export async function upgrade() {
99
const config = await AppRuntime.runPromise(Config.Service.use((cfg) => cfg.getGlobal()))
10+
if (config.autoupdate === false || Flag.OPENCODE_DISABLE_AUTOUPDATE) return
1011
const method = await AppRuntime.runPromise(Installation.Service.use((svc) => svc.method()))
1112
const latest = await AppRuntime.runPromise(Installation.Service.use((svc) => svc.latest(method))).catch(() => {})
1213
if (!latest) return
@@ -17,7 +18,6 @@ export async function upgrade() {
1718
}
1819

1920
if (InstallationVersion === latest) return
20-
if (config.autoupdate === false || Flag.OPENCODE_DISABLE_AUTOUPDATE) return
2121

2222
const kind = Installation.getReleaseType(InstallationVersion, latest)
2323

0 commit comments

Comments
 (0)