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.
This commit is contained in:
iddev5 2022-03-18 13:10:41 +05:30
parent d15bbebe2e
commit df544cace9

View File

@ -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,
}
};