summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJoscha Götzer <[email protected]>2025-10-26 07:40:17 +0100
committerGitHub <[email protected]>2025-10-26 01:40:17 -0500
commit7d0c6860cd5215663b385e436473b3f9759601ad (patch)
treea8b84b18e4f021ed6830a1a7f06ec7bafbb49942
parentc70e393c8156a441a519e1ea93578c82c9c7bcef (diff)
downloadopencode-7d0c6860cd5215663b385e436473b3f9759601ad.tar.gz
opencode-7d0c6860cd5215663b385e436473b3f9759601ad.zip
fix: make build script work cross-platform (#3430)
Co-authored-by: JosXa <[email protected]>
-rwxr-xr-xpackages/opencode/script/build.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/opencode/script/build.ts b/packages/opencode/script/build.ts
index feb91e09b..b3d6d57dd 100755
--- a/packages/opencode/script/build.ts
+++ b/packages/opencode/script/build.ts
@@ -1,6 +1,11 @@
#!/usr/bin/env bun
import path from "path"
-const dir = new URL("..", import.meta.url).pathname
+import { fileURLToPath } from "url"
+
+const __filename = fileURLToPath(import.meta.url)
+const __dirname = path.dirname(__filename)
+const dir = path.resolve(__dirname, "..")
+
process.chdir(dir)
import { $ } from "bun"