Merge pull request #2787 from emekoi/fix-2768

forward error code in build.zig
This commit is contained in:
Andrew Kelley 2019-07-04 10:57:25 -04:00 committed by GitHub
commit 79e1fcfdda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -769,14 +769,14 @@ pub const Builder = struct {
if (code != 0) {
warn("The following command exited with error code {}:\n", code);
printCmd(null, argv);
std.debug.panic("exec failed");
std.os.exit(@truncate(u8, code));
}
return stdout.toOwnedSlice();
},
else => {
.Signal, .Stopped, .Unknown => |code| {
warn("The following command terminated unexpectedly:\n");
printCmd(null, argv);
std.debug.panic("exec failed");
std.os.exit(@truncate(u8, code));
},
}