authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-07-04 10:57:25-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2019-07-04 10:57:25-04:00
log79e1fcfddac681128698acd2ef5667b233015c58
tree0df52750c71cc02a12a5caa05a81cea71b8e2a56
parentb109155528e19a181b123ef08667a415c5664320
parent9e3189f1f460cd141e849ff5f868bdc6d5268e4e
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #2787 from emekoi/fix-2768

forward error code in build.zig

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

std/build.zig+3-3
...@@ -769,14 +769,14 @@ pub const Builder = struct {...@@ -769,14 +769,14 @@ pub const Builder = struct {
769 if (code != 0) {769 if (code != 0) {
770 warn("The following command exited with error code {}:\n", code);770 warn("The following command exited with error code {}:\n", code);
771 printCmd(null, argv);771 printCmd(null, argv);
772 std.debug.panic("exec failed");772 std.os.exit(@truncate(u8, code));
773 }773 }
774 return stdout.toOwnedSlice();774 return stdout.toOwnedSlice();
775 },775 },
776 else => {776 .Signal, .Stopped, .Unknown => |code| {
777 warn("The following command terminated unexpectedly:\n");777 warn("The following command terminated unexpectedly:\n");
778 printCmd(null, argv);778 printCmd(null, argv);
779 std.debug.panic("exec failed");779 std.os.exit(@truncate(u8, code));
780 },780 },
781 }781 }
782782