Commit df544cace9

iddev5 <ayushbardhan5@gmail.com>
2022-03-18 08:40:41
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.
1 parent d15bbeb
Changed files (1)
lib
std
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,
         }
     };