From 9e7cf5948a3ab3abec23ab1b310d6b7dab88663a Mon Sep 17 00:00:00 2001 From: fubark Date: Sat, 9 Dec 2023 21:23:54 -0500 Subject: [PATCH] Maybe fix for windows. --- src/cli.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cli.zig b/src/cli.zig index 724ceb4df..9d904529c 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -178,6 +178,9 @@ fn zResolve(uvm: *cy.UserVM, chunkId: cy.ChunkId, curUri: []const u8, spec: []co const absPath = std.fs.cwd().realpath(path, chunk.tempBufU8.items[path.len..]) catch |err| { if (err == error.FileNotFound) { const msg = try cy.fmt.allocFormat(vm.alloc, "Import path does not exist: `{}`", &.{v(path)}); + if (builtin.os.tag == .windows) { + _ = std.mem.replaceScalar(u8, msg, '/', '\\'); + } defer vm.alloc.free(msg); try vm.setApiError(msg); return error.HandledError;