| ... | @@ -158,13 +158,15 @@ pub fn file_list(dpath: []const u8, list: *std.ArrayList([]const u8)) !void { | ... | @@ -158,13 +158,15 @@ pub fn file_list(dpath: []const u8, list: *std.ArrayList([]const u8)) !void { |
| 158 | } | 158 | } |
| 159 | | 159 | |
| 160 | pub fn run_cmd(dir: ?[]const u8, args: []const []const u8) !u32 { | 160 | pub fn run_cmd(dir: ?[]const u8, args: []const []const u8) !u32 { |
| 161 | const result = std.ChildProcess.exec(.{ .allocator = gpa, .cwd = dir, .argv = args, }) catch |e| switch(e) { | 161 | const result = std.ChildProcess.exec(.{ .allocator = gpa, .cwd = dir, .argv = args, .max_output_bytes = std.math.maxInt(usize) }) catch |e| switch(e) { |
| 162 | error.FileNotFound => { | 162 | error.FileNotFound => { |
| 163 | u.assert(false, "\"{s}\" command not found", .{args[0]}); | 163 | u.assert(false, "\"{s}\" command not found", .{args[0]}); |
| 164 | unreachable; | 164 | unreachable; |
| 165 | }, | 165 | }, |
| 166 | else => return e, | 166 | else => return e, |
| 167 | }; | 167 | }; |
| | 168 | gpa.free(result.stdout); |
| | 169 | gpa.free(result.stderr); |
| 168 | return result.term.Exited; | 170 | return result.term.Exited; |
| 169 | } | 171 | } |
| 170 | | 172 | |