Skip to content

Commit 6ed661c

Browse files
committed
ci: upgrade bun
1 parent 9dc00ed commit 6ed661c

3 files changed

Lines changed: 18 additions & 17 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
- uses: oven-sh/setup-bun@v1
1919
with:
20-
bun-version: latest
20+
bun-version: 1.2.17
2121

2222
- run: bun install
2323

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- uses: oven-sh/setup-bun@v2
3434
with:
35-
bun-version: 1.2.16
35+
bun-version: 1.2.17
3636

3737
- name: Install makepkg
3838
run: |

packages/opencode/src/index.ts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,22 @@ const cli = yargs(hideBin(process.argv))
9292
},
9393
})
9494

95-
; (async () => {
96-
if (Installation.VERSION === "dev") return
97-
if (Installation.isSnapshot()) return
98-
const config = await Config.global()
99-
if (config.autoupdate === false) return
100-
const latest = await Installation.latest()
101-
if (Installation.VERSION === latest) return
102-
const method = await Installation.method()
103-
if (method === "unknown") return
104-
await Installation.upgrade(method, latest)
105-
.then(() => {
106-
Bus.publish(Installation.Event.Updated, { version: latest })
107-
})
108-
.catch(() => { })
109-
})()
95+
;(async () => {
96+
if (Installation.VERSION === "dev") return
97+
if (Installation.isSnapshot()) return
98+
const config = await Config.global()
99+
if (config.autoupdate === false) return
100+
const latest = await Installation.latest().catch(() => {})
101+
if (!latest) return
102+
if (Installation.VERSION === latest) return
103+
const method = await Installation.method()
104+
if (method === "unknown") return
105+
await Installation.upgrade(method, latest)
106+
.then(() => {
107+
Bus.publish(Installation.Event.Updated, { version: latest })
108+
})
109+
.catch(() => {})
110+
})()
110111

111112
await proc.exited
112113
server.stop()

0 commit comments

Comments
 (0)