Skip to content

Commit

Permalink
Maybe fix for windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
fubark committed Dec 10, 2023
1 parent 9af6f1d commit 9e7cf59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cli.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9e7cf59

Please sign in to comment.