Skip to content

Commit

Permalink
zig fetch: add missing path separator in error message
Browse files Browse the repository at this point in the history
Signed-off-by: Tw <[email protected]>
  • Loading branch information
tw4452852 authored and andrewrk committed Nov 29, 2024
1 parent 8d8801c commit aa7d138
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Package/Fetch.zig
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ fn loadManifest(f: *Fetch, pkg_root: Cache.Path) RunError!void {
ast.* = try std.zig.Ast.parse(arena, manifest_bytes, .zon);

if (ast.errors.len > 0) {
const file_path = try std.fmt.allocPrint(arena, "{}" ++ Manifest.basename, .{pkg_root});
const file_path = try std.fmt.allocPrint(arena, "{}" ++ fs.path.sep_str ++ Manifest.basename, .{pkg_root});
try std.zig.putAstErrorsIntoBundle(arena, ast.*, file_path, eb);
return error.FetchFailed;
}
Expand Down Expand Up @@ -783,7 +783,7 @@ fn srcLoc(
const eb = &f.error_bundle;
const token_starts = ast.tokens.items(.start);
const start_loc = ast.tokenLocation(0, tok);
const src_path = try eb.printString("{}" ++ Manifest.basename, .{f.parent_package_root});
const src_path = try eb.printString("{}" ++ fs.path.sep_str ++ Manifest.basename, .{f.parent_package_root});
const msg_off = 0;
return eb.addSourceLocation(.{
.src_path = src_path,
Expand Down

0 comments on commit aa7d138

Please sign in to comment.