diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-10-14 16:20:20 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-10-16 20:23:18 -0400 |
| commit | 0e4c3934a02cda80a72a730593ece41c7fa8026a (patch) | |
| tree | 923d6b37f0000bb47e2b0f004d8d38798172c4f3 /src | |
| parent | 8364417c8fead9f617a4c1a83af0c6401a1c4240 (diff) | |
| download | zig-0e4c3934a02cda80a72a730593ece41c7fa8026a.tar.gz zig-0e4c3934a02cda80a72a730593ece41c7fa8026a.zip | |
zig fmt: write modified files to stdout not stderr
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.zig b/src/main.zig index fa523fdb90..8162bc46b6 100644 --- a/src/main.zig +++ b/src/main.zig @@ -2631,8 +2631,8 @@ fn fmtPathFile( if (check_mode) { const anything_changed = try std.zig.render(fmt.gpa, io.null_out_stream, tree); if (anything_changed) { - // TODO this should output to stdout instead of stderr. - std.debug.print("{}\n", .{file_path}); + const stdout = io.getStdOut().writer(); + try stdout.print("{}\n", .{file_path}); fmt.any_error = true; } } else { @@ -2649,8 +2649,8 @@ fn fmtPathFile( try af.file.writeAll(fmt.out_buffer.items); try af.finish(); - // TODO this should output to stdout instead of stderr. - std.debug.print("{}\n", .{file_path}); + const stdout = io.getStdOut().writer(); + try stdout.print("{}\n", .{file_path}); } } |
