Don't log ananicy failures - fix zig 0.14.0 build
This commit is contained in:
parent
af4ac1c167
commit
be0c2e28b2
@ -266,15 +266,13 @@ fn runSystemCtl(alloc: std.mem.Allocator, command: []const u8, service: []const
|
|||||||
.allocator = alloc,
|
.allocator = alloc,
|
||||||
.argv = &argv,
|
.argv = &argv,
|
||||||
.max_output_bytes = max_output_size,
|
.max_output_bytes = max_output_size,
|
||||||
}) catch |err| {
|
}) catch {
|
||||||
std.log.warn("Failed to run systemctl {s} {s}: {}", .{ command, service, err });
|
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
defer alloc.free(result.stderr);
|
defer alloc.free(result.stderr);
|
||||||
defer alloc.free(result.stdout);
|
defer alloc.free(result.stdout);
|
||||||
|
|
||||||
if (result.term.Exited != 0) {
|
if (result.term.Exited != 0) {
|
||||||
std.log.warn("systemctl failed: {s}", .{result.stderr});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,7 +288,7 @@ pub fn Parser(comptime T: type) type {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
.pointer => |ptr_info| {
|
.pointer => |ptr_info| {
|
||||||
if (ptr_info.size != .Slice) return error.InvalidSyntax;
|
if (ptr_info.size != .many) return error.InvalidSyntax;
|
||||||
switch (ptr_info.child) {
|
switch (ptr_info.child) {
|
||||||
u8 => {
|
u8 => {
|
||||||
@field(result, field.name) = try self.parseString();
|
@field(result, field.name) = try self.parseString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user