Copy changes

This commit is contained in:
Jay V
2025-06-19 16:28:03 -04:00
parent 15a8936806
commit f5e7f079ea
4 changed files with 26 additions and 26 deletions

View File

@@ -36,7 +36,7 @@ const cli = yargs(hideBin(process.argv))
.usage("\n" + UI.logo())
.command({
command: "$0 [project]",
describe: "Start opencode TUI",
describe: "start opencode TUI",
builder: (yargs) =>
yargs.positional("project", {
type: "string",
@@ -84,21 +84,21 @@ const cli = yargs(hideBin(process.argv))
},
})
;(async () => {
if (Installation.VERSION === "dev") return
if (Installation.isSnapshot()) return
const config = await Config.global()
if (config.autoupdate === false) return
const latest = await Installation.latest()
if (Installation.VERSION === latest) return
const method = await Installation.method()
if (method === "unknown") return
await Installation.upgrade(method, latest)
.then(() => {
Bus.publish(Installation.Event.Updated, { version: latest })
})
.catch(() => {})
})()
; (async () => {
if (Installation.VERSION === "dev") return
if (Installation.isSnapshot()) return
const config = await Config.global()
if (config.autoupdate === false) return
const latest = await Installation.latest()
if (Installation.VERSION === latest) return
const method = await Installation.method()
if (method === "unknown") return
await Installation.upgrade(method, latest)
.then(() => {
Bus.publish(Installation.Event.Updated, { version: latest })
})
.catch(() => { })
})()
await proc.exited
server.stop()