File tree Expand file tree Collapse file tree
packages/opencode/src/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { InstallationVersion } from "@/installation/version"
77
88export 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
You can’t perform that action at this time.
0 commit comments