From 7d0c6860cd5215663b385e436473b3f9759601ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joscha=20G=C3=B6tzer?= Date: Sun, 26 Oct 2025 07:40:17 +0100 Subject: [PATCH] fix: make build script work cross-platform (#3430) Co-authored-by: JosXa --- packages/opencode/script/build.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/opencode/script/build.ts b/packages/opencode/script/build.ts index feb91e09..b3d6d57d 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"