srctree

jd parent 64b98935 d23a8e83
std.Build.Step.ConfigHeader: better error message

inlinesplit
lib/std/Build/Step/ConfigHeader.zig added: 6, removed: 2, total 4
@@ -203,7 +203,11 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
.cmake => |file_source| {
try output.appendSlice(c_generated_line);
const src_path = file_source.getPath(b);
const contents = try std.fs.cwd().readFileAlloc(arena, src_path, self.max_bytes);
const contents = std.fs.cwd().readFileAlloc(arena, src_path, self.max_bytes) catch |err| {
return step.fail("unable to read cmake input file '{s}': {s}", .{
src_path, @errorName(err),
});
};
try render_cmake(step, contents, &output, self.values, src_path);
},
.blank => {