aboutsummaryrefslogtreecommitdiff
path: root/lib/compiler/fmt.zig
diff options
context:
space:
mode:
authorDaniel Hooper <danielchasehooper@gmail.com>2024-11-11 01:24:14 -0800
committerGitHub <noreply@github.com>2024-11-11 01:24:14 -0800
commit560d6b99d5be8e906b7d8d70a2b2e1f1d4da4f89 (patch)
tree0cc72dd625b7b6cb72d0b0d2161aaac0c21e040a /lib/compiler/fmt.zig
parentf83bb94ca6aec933713f91b73b8a487a701dbfcd (diff)
downloadzig-560d6b99d5be8e906b7d8d70a2b2e1f1d4da4f89.tar.gz
zig-560d6b99d5be8e906b7d8d70a2b2e1f1d4da4f89.zip
Fix silent zig fmt errors (#21948)
Diffstat (limited to 'lib/compiler/fmt.zig')
-rw-r--r--lib/compiler/fmt.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/compiler/fmt.zig b/lib/compiler/fmt.zig
index 5a4f112c34..b078198480 100644
--- a/lib/compiler/fmt.zig
+++ b/lib/compiler/fmt.zig
@@ -3,7 +3,6 @@ const mem = std.mem;
const fs = std.fs;
const process = std.process;
const Allocator = std.mem.Allocator;
-const warn = std.log.warn;
const Color = std.zig.Color;
const usage_fmt =
@@ -214,7 +213,7 @@ fn fmtPath(fmt: *Fmt, file_path: []const u8, check_mode: bool, dir: fs.Dir, sub_
fmtPathFile(fmt, file_path, check_mode, dir, sub_path) catch |err| switch (err) {
error.IsDir, error.AccessDenied => return fmtPathDir(fmt, file_path, check_mode, dir, sub_path),
else => {
- warn("unable to format '{s}': {s}", .{ file_path, @errorName(err) });
+ std.log.err("unable to format '{s}': {s}", .{ file_path, @errorName(err) });
fmt.any_error = true;
return;
},
@@ -248,7 +247,7 @@ fn fmtPathDir(
try fmtPathDir(fmt, full_path, check_mode, dir, entry.name);
} else {
fmtPathFile(fmt, full_path, check_mode, dir, entry.name) catch |err| {
- warn("unable to format '{s}': {s}", .{ full_path, @errorName(err) });
+ std.log.err("unable to format '{s}': {s}", .{ full_path, @errorName(err) });
fmt.any_error = true;
return;
};