summaryrefslogtreecommitdiffhomepage
path: root/packages/script/src
diff options
context:
space:
mode:
authorGitHub Action <[email protected]>2025-11-08 01:59:02 +0000
committerGitHub Action <[email protected]>2025-11-08 01:59:02 +0000
commit34ff87d504836ff71b3bb2d466842c00ee3c5ec2 (patch)
treecc8ac777f2f082ff676b179017c7dc0f3270314b /packages/script/src
parent16357e804145b7f96a2a53badb7dcb6c5453dafe (diff)
downloadopencode-34ff87d504836ff71b3bb2d466842c00ee3c5ec2.tar.gz
opencode-34ff87d504836ff71b3bb2d466842c00ee3c5ec2.zip
chore: format code
Diffstat (limited to 'packages/script/src')
-rw-r--r--packages/script/src/index.ts11
1 files changed, 3 insertions, 8 deletions
diff --git a/packages/script/src/index.ts b/packages/script/src/index.ts
index 695a45143..141d2b750 100644
--- a/packages/script/src/index.ts
+++ b/packages/script/src/index.ts
@@ -10,19 +10,14 @@ if (!expectedBunVersion) {
}
if (process.versions.bun !== expectedBunVersion) {
- throw new Error(
- `This script requires bun@${expectedBunVersion}, but you are using bun@${process.versions.bun}`,
- )
+ throw new Error(`This script requires bun@${expectedBunVersion}, but you are using bun@${process.versions.bun}`)
}
-const CHANNEL =
- process.env["OPENCODE_CHANNEL"] ??
- (await $`git branch --show-current`.text().then((x) => x.trim()))
+const CHANNEL = process.env["OPENCODE_CHANNEL"] ?? (await $`git branch --show-current`.text().then((x) => x.trim()))
const IS_PREVIEW = CHANNEL !== "latest"
const VERSION = await (async () => {
if (process.env["OPENCODE_VERSION"]) return process.env["OPENCODE_VERSION"]
- if (IS_PREVIEW)
- return `0.0.0-${CHANNEL}-${new Date().toISOString().slice(0, 16).replace(/[-:T]/g, "")}`
+ if (IS_PREVIEW) return `0.0.0-${CHANNEL}-${new Date().toISOString().slice(0, 16).replace(/[-:T]/g, "")}`
const version = await fetch("https://registry.npmjs.org/opencode-ai/latest")
.then((res) => {
if (!res.ok) throw new Error(res.statusText)