diff --git a/src/main.zig b/src/main.zig index 58c614c76efd38d717639b2b090a6f0328b0b688..246eacfe7ae70ba4151a2700750b8e2bef22ffda 100644 --- a/src/main.zig +++ b/src/main.zig @@ -3960,7 +3960,10 @@ pub fn cmdFmt(gpa: Allocator, arena: Allocator, args: []const []const u8) !void // Mark any excluded files/directories as already seen, // so that they are skipped later during actual processing for (excluded_files.items) |file_path| { - var dir = try fs.cwd().openDir(file_path, .{}); + var dir = fs.cwd().openDir(file_path, .{}) catch |err| switch (err) { + error.FileNotFound => continue, + else => |e| return e, + }; defer dir.close(); const stat = try dir.stat();