aboutsummaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-07-04 10:57:25 -0400
committerGitHub <noreply@github.com>2019-07-04 10:57:25 -0400
commit79e1fcfddac681128698acd2ef5667b233015c58 (patch)
tree0df52750c71cc02a12a5caa05a81cea71b8e2a56 /std
parentb109155528e19a181b123ef08667a415c5664320 (diff)
parent9e3189f1f460cd141e849ff5f868bdc6d5268e4e (diff)
downloadzig-79e1fcfddac681128698acd2ef5667b233015c58.tar.gz
zig-79e1fcfddac681128698acd2ef5667b233015c58.zip
Merge pull request #2787 from emekoi/fix-2768
forward error code in build.zig
Diffstat (limited to 'std')
-rw-r--r--std/build.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/build.zig b/std/build.zig
index de319197a4..425763da96 100644
--- a/std/build.zig
+++ b/std/build.zig
@@ -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));
},
}