From 7b337cb51abda134ea86f61589e7c6fcafb71a30 Mon Sep 17 00:00:00 2001 From: Dave Gauer Date: Tue, 16 Feb 2021 18:10:02 -0500 Subject: Exit rather than return upon version failure (#14) A plain `zig build` was exiting as expected after the version check failure did an early 'return'. But `zig build 01` (specifying a step) would print the fail message and then continue...but fail to find the step (which was not added). Calling `exit()` solves this. Calling it with an error status code causes vomiting in the build system (since, you know, there was an error). So returning with `exit(0)` is the way to go here. --- build.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index bb6be4f..c85f978 100644 --- a/build.zig +++ b/build.zig @@ -281,7 +281,7 @@ pub fn build(b: *Builder) void { \\https://ziglang.org/download/ \\ , .{}); - return; + std.os.exit(0); } use_color_escapes = false; -- cgit v1.2.3-ZIG