Update build.ts

This commit is contained in:
LukeParkerDev
2026-02-09 16:42:04 +10:00
parent 4e77e52395
commit 7a1e6c5326

View File

@@ -137,12 +137,12 @@ for (const item of targets) {
const bunfsRoot = item.os === "win32" ? "B:/~BUN/root/" : "/$bunfs/root/"
const workerRelativePath = path.relative(dir, parserWorker).replaceAll("\\", "/")
// Use fork bun runtime for Windows targets
// Set BUN_FORK_VERSION env var (e.g. "1.3.9-opencode") to use anomalyco/bun fork binaries
const forkVersion = process.env.BUN_FORK_VERSION
if (item.os === "win32" && forkVersion) {
// Use anomalyco/bun fork for Windows targets (includes Ctrl+C fix from PR #25876)
// https://github.com/anomalyco/bun/releases/tag/v1.3.9-opencode.1
const BUN_FORK_VERSION = "1.3.9-opencode.1"
if (item.os === "win32") {
const variant = item.avx2 === false ? "bun-windows-x64-baseline" : "bun-windows-x64"
process.env.BUN_COMPILE_TARGET_TARBALL_URL = `https://github.com/anomalyco/bun/releases/download/v${forkVersion}/${variant}.tgz`
process.env.BUN_COMPILE_TARGET_TARBALL_URL = `https://github.com/anomalyco/bun/releases/download/v${BUN_FORK_VERSION}/${variant}.tgz`
} else {
delete process.env.BUN_COMPILE_TARGET_TARBALL_URL
}