Deprecated; use runFallible.
pub fn runAllowFail(
b: *Build,
argv: []const []const u8,
exit_code: *u8,
stderr_behavior: process.SpawnOptions.StdIo,
) anyerror![]u8
pub fn runAllowFail(
b: *Build,
argv: []const []const u8,
exit_code: *u8,
stderr_behavior: process.SpawnOptions.StdIo,
) anyerror![]u8 {
if (!process.can_spawn) return error.ExecNotSupported;
switch (runFallible(b, argv, .{
.stderr_behavior = stderr_behavior,
})) {
.success => |stdout| return stdout,
.spawn_failed => |err| return err,
.bad_exit_code => |code| {
exit_code.* = code;
return error.ExitCodeFailure;
},
.crashed => {
exit_code.* = 255;
return error.ProcessTerminated;
},
}
}