aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-10-14 16:20:20 +0200
committerAndrew Kelley <andrew@ziglang.org>2020-10-16 20:23:18 -0400
commit0e4c3934a02cda80a72a730593ece41c7fa8026a (patch)
tree923d6b37f0000bb47e2b0f004d8d38798172c4f3 /src
parent8364417c8fead9f617a4c1a83af0c6401a1c4240 (diff)
downloadzig-0e4c3934a02cda80a72a730593ece41c7fa8026a.tar.gz
zig-0e4c3934a02cda80a72a730593ece41c7fa8026a.zip
zig fmt: write modified files to stdout not stderr
Diffstat (limited to 'src')
-rw-r--r--src/main.zig8
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});
}
}