mirror of
https://github.com/sst/opencode.git
synced 2025-07-07 16:14:59 +00:00
ci: windows
This commit is contained in:
parent
4f715e66dc
commit
1bad3d9894
1 changed files with 5 additions and 1 deletions
|
@ -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 })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue