fix: gate passive update check behind explicit env flag
This commit is contained in:
@@ -6,9 +6,9 @@ import { InstallationVersion } from "@opencode-ai/core/installation/version"
|
|||||||
import { GlobalBus } from "@/bus/global"
|
import { GlobalBus } from "@/bus/global"
|
||||||
|
|
||||||
export async function upgrade() {
|
export async function upgrade() {
|
||||||
// Neuron fork: update checks are opt-in. We do not phone home by default.
|
// Neuron fork: the passive update check is disabled. Set
|
||||||
const config = await AppRuntime.runPromise(Config.Service.use((cfg) => cfg.getGlobal()))
|
// OPENCODE_ALWAYS_NOTIFY_UPDATE=1 to re-enable release notifications.
|
||||||
if (config.autoupdate !== true || Flag.OPENCODE_DISABLE_AUTOUPDATE) return
|
if (!Flag.OPENCODE_ALWAYS_NOTIFY_UPDATE) return
|
||||||
const method = await Installation.method()
|
const method = await Installation.method()
|
||||||
const latest = await Installation.latest(method).catch(() => {})
|
const latest = await Installation.latest(method).catch(() => {})
|
||||||
if (!latest) return
|
if (!latest) return
|
||||||
|
|||||||
Reference in New Issue
Block a user