diff options
| author | Lee Cannon <leecannon@leecannon.xyz> | 2020-12-09 07:45:54 +0000 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2020-12-09 12:11:52 +0200 |
| commit | 3599fb9bfc221c37cdd59d3b19a10eff63a4170e (patch) | |
| tree | 1fadfccecccef8c8de36cf3f8e20cb7ba5ded262 /src/main.zig | |
| parent | 391d81a3802e48f59d804746eedc396d60ad3820 (diff) | |
| download | zig-3599fb9bfc221c37cdd59d3b19a10eff63a4170e.tar.gz zig-3599fb9bfc221c37cdd59d3b19a10eff63a4170e.zip | |
Fixes #7352 - ignore zig fmt ignore zig-cache
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index 62732d252b..323c33612a 100644 --- a/src/main.zig +++ b/src/main.zig @@ -2655,6 +2655,9 @@ fn fmtPathDir( var dir_it = dir.iterate(); while (try dir_it.next()) |entry| { const is_dir = entry.kind == .Directory; + + if (is_dir and std.mem.eql(u8, entry.name, "zig-cache")) continue; + if (is_dir or mem.endsWith(u8, entry.name, ".zig")) { const full_path = try fs.path.join(fmt.gpa, &[_][]const u8{ file_path, entry.name }); defer fmt.gpa.free(full_path); |
