Skip to content

Commit

Permalink
CLI: better error message when build runner cannot be spawned
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk authored and SammyJames committed Aug 7, 2024
1 parent 4fefa59 commit fc31658
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5309,7 +5309,9 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
const term = t: {
std.debug.lockStdErr();
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) {
Expand Down

0 comments on commit fc31658

Please sign in to comment.