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

@@ -19,7 +19,7 @@ export namespace Log {
await fs.mkdir(dir, { recursive: true })
cleanup(dir)
if (options.print) return
logpath = path.join(dir, new Date().toISOString().split(".")[0] + ".log")
logpath = path.join(dir, new Date().toISOString().split(".")[0].replace(/:/g, "") + ".log")
const logfile = Bun.file(logpath)
await fs.truncate(logpath).catch(() => {})
const writer = logfile.writer()