authorgravatar for techatrix@mailbox.orgTechatrix <techatrix@mailbox.org> 2025-08-09 13:47:07+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-08-10 19:42:54+02:00
log298328581534de4b7cb984f7d5e8a5c4080a881c
treedf9b6df144d02c4dffa21801e8a98f28006945da
parent6a1d61d5044777350e742ecda1c35a23a0550395

zig fmt: flush stdout before exiting with error


1 files changed, 1 insertions(+), 1 deletions(-)

src/fmt.zig+1-1
...@@ -195,10 +195,10 @@ pub fn run(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {...@@ -195,10 +195,10 @@ pub fn run(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
195 for (input_files.items) |file_path| {195 for (input_files.items) |file_path| {
196 try fmtPath(&fmt, file_path, check_flag, fs.cwd(), file_path);196 try fmtPath(&fmt, file_path, check_flag, fs.cwd(), file_path);
197 }197 }
198 try fmt.stdout_writer.interface.flush();
198 if (fmt.any_error) {199 if (fmt.any_error) {
199 process.exit(1);200 process.exit(1);
200 }201 }
201 try fmt.stdout_writer.interface.flush();
202}202}
203203
204fn fmtPath(fmt: *Fmt, file_path: []const u8, check_mode: bool, dir: fs.Dir, sub_path: []const u8) !void {204fn fmtPath(fmt: *Fmt, file_path: []const u8, check_mode: bool, dir: fs.Dir, sub_path: []const u8) !void {