authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-07 16:59:53-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-03-15 10:48:14-07:00
logf558c835a41052b7609f0f0b27c5bbc4fe6b024d
treec55b5d64e71315677ba2f1845ecfcc3019b06d62
parent4efeeaac881c5583321e8b385e90f004e99bc3d1

std.Build.CheckObjectStep: better error message

when reading the file fails

1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/Build/CheckObjectStep.zig+2-2
......@@ -314,14 +314,14 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
314314 const self = @fieldParentPtr(CheckObjectStep, "step", step);
315315
316316 const src_path = self.source.getPath(b);
317 const contents = try fs.cwd().readFileAllocOptions(
317 const contents = fs.cwd().readFileAllocOptions(
318318 gpa,
319319 src_path,
320320 self.max_bytes,
321321 null,
322322 @alignOf(u64),
323323 null,
324 );
324 ) catch |err| return step.fail("unable to read '{s}': {s}", .{ src_path, @errorName(err) });
325325
326326 const output = switch (self.obj_format) {
327327 .macho => try MachODumper.parseAndDump(step, contents, .{