Skip to content

Commit e7ed7a1

Browse files
authored
ci(tests.formatting): find -exec {} + (#549)
find has this feature, and it also batches the files but automatically respects whatever ARG_MAX is. Lets use that instead of `find -print0 | xargs -0` in the interest of only using 1 program for gathering the args Context: #548 I forgot how find worked due to learning about the `find -print0 | xargs -0` trick for the first time The resulting log output is the same.
1 parent 30d44d8 commit e7ed7a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ci/checks/formatting.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
}:
66

77
pkgs.runCommand "formatting-check" { } ''
8-
find ${../../.} -name "*.nix" -print0 | xargs -0 ${pkgs.lib.getExe pkgs.nixfmt} --check
8+
find ${../../.} -type f -name "*.nix" -exec ${pkgs.lib.getExe pkgs.nixfmt} --check {} +
99
touch $out
1010
''

0 commit comments

Comments
 (0)