windows fixes (#374)

Co-authored-by: Matthew Glazar <strager.nds@gmail.com>
This commit is contained in:
Dax
2025-06-24 18:05:04 -04:00
committed by GitHub
parent a2d3b9f0c8
commit ec001ca02f
5 changed files with 31 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import { Server } from "./server/server"
import fs from "fs/promises"
import path from "path"
import { Share } from "./share/share"
import url from "node:url"
import { Global } from "./global"
import yargs from "yargs"
import { hideBin } from "yargs/helpers"
@@ -63,7 +64,7 @@ const cli = yargs(hideBin(process.argv))
const server = Server.listen()
let cmd = ["go", "run", "./main.go"]
let cwd = new URL("../../tui/cmd/opencode", import.meta.url).pathname
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)