Skip to content

Commit aa7d138

Browse files
tw4452852andrewrk
authored andcommitted
zig fetch: add missing path separator in error message
Signed-off-by: Tw <[email protected]>
1 parent 8d8801c commit aa7d138

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Package/Fetch.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ fn loadManifest(f: *Fetch, pkg_root: Cache.Path) RunError!void {
609609
ast.* = try std.zig.Ast.parse(arena, manifest_bytes, .zon);
610610

611611
if (ast.errors.len > 0) {
612-
const file_path = try std.fmt.allocPrint(arena, "{}" ++ Manifest.basename, .{pkg_root});
612+
const file_path = try std.fmt.allocPrint(arena, "{}" ++ fs.path.sep_str ++ Manifest.basename, .{pkg_root});
613613
try std.zig.putAstErrorsIntoBundle(arena, ast.*, file_path, eb);
614614
return error.FetchFailed;
615615
}
@@ -783,7 +783,7 @@ fn srcLoc(
783783
const eb = &f.error_bundle;
784784
const token_starts = ast.tokens.items(.start);
785785
const start_loc = ast.tokenLocation(0, tok);
786-
const src_path = try eb.printString("{}" ++ Manifest.basename, .{f.parent_package_root});
786+
const src_path = try eb.printString("{}" ++ fs.path.sep_str ++ Manifest.basename, .{f.parent_package_root});
787787
const msg_off = 0;
788788
return eb.addSourceLocation(.{
789789
.src_path = src_path,

0 commit comments

Comments
 (0)