summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-06-24 18:27:57 -0400
committerDax Raad <[email protected]>2025-06-24 18:27:57 -0400
commit1bad3d98946994073e82e895734b1276a1593d81 (patch)
treed2dc2c374fce6f08954e4e22d41d58b540919cc0
parent4f715e66dc52e141319c6ce514c9cfeb8100a345 (diff)
downloadopencode-1bad3d98946994073e82e895734b1276a1593d81.tar.gz
opencode-1bad3d98946994073e82e895734b1276a1593d81.zip
ci: windows
-rw-r--r--packages/opencode/src/index.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/opencode/src/index.ts b/packages/opencode/src/index.ts
index 50fa5cccb..73dd1d207 100644
--- a/packages/opencode/src/index.ts
+++ b/packages/opencode/src/index.ts
@@ -67,7 +67,11 @@ const cli = yargs(hideBin(process.argv))
let cwd = url.fileURLToPath(new URL("../../tui/cmd/opencode", import.meta.url))
if (Bun.embeddedFiles.length > 0) {
const blob = Bun.embeddedFiles[0] as File
- const binary = path.join(Global.Path.cache, "tui", blob.name)
+ let binaryName = blob.name
+ if (process.platform === "win32" && !binaryName.endsWith(".exe")) {
+ binaryName += ".exe"
+ }
+ const binary = path.join(Global.Path.cache, "tui", binaryName)
const file = Bun.file(binary)
if (!(await file.exists())) {
await Bun.write(file, blob, { mode: 0o755 })