Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › Build › runAllowFail Public Function runAllowFail Doc Source Public Function std.Build.runAllowFail
pub fn runAllowFail (
b : *Build ,
argv : []const []const u8 ,
exit_code : *u8 ,
stderr_behavior : process .SpawnOptions .StdIo ,
) anyerror ![]u8 Params b : *Build argv : []const []const u8 exit_code : *u8 stderr_behavior : process .SpawnOptions .StdIo File Build.zig: 1701
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722 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 ;
},
}
}
Deprecated; use
runFallible.