From 09761679f312d1e1233150de9f25b1053b91eaa8 Mon Sep 17 00:00:00 2001 From: fubark Date: Sat, 9 Dec 2023 21:23:54 -0500 Subject: [PATCH] Maybe fix for windows. Please enter the commit message for your changes. Lines starting --- src/cli.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cli.zig b/src/cli.zig index 724ceb4df..f0ce54763 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -177,7 +177,10 @@ fn zResolve(uvm: *cy.UserVM, chunkId: cy.ChunkId, curUri: []const u8, spec: []co chunk.tempBufU8.items.len += std.fs.MAX_PATH_BYTES; 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)}); + var 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;