From e5a4f69cc952f0986b59b9d0b65175da74cafffc Mon Sep 17 00:00:00 2001 From: Birdee <85372418+BirdeeHub@users.noreply.github.com> Date: Wed, 20 May 2026 10:06:05 -0700 Subject: [PATCH] ci(tests.formatting): `find -exec {} +` 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: https://github.com/BirdeeHub/nix-wrapper-modules/pull/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. --- ci/checks/formatting.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/checks/formatting.nix b/ci/checks/formatting.nix index 95c83f87..948fd68d 100644 --- a/ci/checks/formatting.nix +++ b/ci/checks/formatting.nix @@ -5,6 +5,6 @@ }: pkgs.runCommand "formatting-check" { } '' - find ${../../.} -name "*.nix" -print0 | xargs -0 ${pkgs.lib.getExe pkgs.nixfmt} --check + find ${../../.} -type f -name "*.nix" -exec ${pkgs.lib.getExe pkgs.nixfmt} --check {} + touch $out ''