authorgravatar for ayushbardhan5@gmail.comiddev5 <ayushbardhan5@gmail.com> 2022-03-18 13:10:41+05:30
committergravatar for ayushbardhan5@gmail.comiddev5 <ayushbardhan5@gmail.com> 2022-03-27 18:19:55+05:30
logdf544cace97b57b318dba439d4e67a3953388477
tree96f3830cd7172d76e0a40c5e6f0b7b210fc7c87c
parentd15bbebe2e6b8fcbfcd730a6c0d1be621b27045d

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 files changed, 1 insertions(+), 1 deletions(-)

lib/std/special/build_runner.zig+1-1
...@@ -205,7 +205,7 @@ pub fn main() !void {...@@ -205,7 +205,7 @@ pub fn main() !void {
205 error.InvalidStepName => {205 error.InvalidStepName => {
206 return usageAndErr(builder, true, stderr_stream);206 return usageAndErr(builder, true, stderr_stream);
207 },207 },
208 error.UncleanExit => process.exit(1),208 error.UnexpectedExitCode, error.UncleanExit => process.exit(1),
209 else => return err,209 else => return err,
210 }210 }
211 };211 };