CLI: better error message when build runner cannot be spawned

This commit is contained in:
Andrew Kelley 2024-07-24 19:40:38 -07:00
parent 3844b91db7
commit 4135cc9d0b

View File

@ -5305,7 +5305,9 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
const term = t: { const term = t: {
std.debug.lockStdErr(); std.debug.lockStdErr();
defer std.debug.unlockStdErr(); defer std.debug.unlockStdErr();
break :t try child.spawnAndWait(); break :t child.spawnAndWait() catch |err| {
fatal("unable to spawn {s}: {s}", .{ child_argv.items[0], @errorName(err) });
};
}; };
switch (term) { switch (term) {