From 99271f183d4c533b72ff0d69ce2426b168b56a6f Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Mon, 16 Dec 2024 19:11:47 +0200 Subject: [PATCH] main: fix output always being written to stdout --- src/main.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index bac05a4..97e5911 100644 --- a/src/main.zig +++ b/src/main.zig @@ -109,7 +109,7 @@ fn translate(d: *aro.Driver, args: []const []const u8) !void { close_out_file = true; out_file_path = path; } - std.io.getStdOut().writeAll(formatted) catch |err| + out_file.writeAll(formatted) catch |err| return d.fatal("failed to write result to '{s}': {s}", .{ out_file_path, aro.Driver.errorDescription(err) }); if (fast_exit) process.exit(0);