From df544cace97b57b318dba439d4e67a3953388477 Mon Sep 17 00:00:00 2001 From: iddev5 Date: Fri, 18 Mar 2022 13:10:41 +0530 Subject: [PATCH] std: explicitly handle error.UnexpectedExitCode in build_runner RunStep on unexpected exit code used to return error.UncleanExit, which was confusing and unclear. When it was changed, the error handling code in build_runner was not modified, which produced an error trace. This commit explicitly handles error.UnexpectedExitCode in build_runner so that the behavior now matches that of zig 0.8.1 after which it was regressed. --- lib/std/special/build_runner.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/special/build_runner.zig b/lib/std/special/build_runner.zig index eb83ef8fcd..bdc2d0457e 100644 --- a/lib/std/special/build_runner.zig +++ b/lib/std/special/build_runner.zig @@ -205,7 +205,7 @@ pub fn main() !void { error.InvalidStepName => { return usageAndErr(builder, true, stderr_stream); }, - error.UncleanExit => process.exit(1), + error.UnexpectedExitCode, error.UncleanExit => process.exit(1), else => return err, } };