Skip to content

Commit 8b60f8b

Browse files
committed
Loop over all files that changed
1 parent 18e5898 commit 8b60f8b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

modules/hooks.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2236,7 +2236,13 @@ in
22362236
name = "circleci";
22372237
description = "Validate CircleCI config files.";
22382238
package = tools.circleci-cli;
2239-
entry = "${hooks.circleci.package}/bin/circleci config validate";
2239+
entry = builtins.toString pkgs.writeShellScript "precommit-circleci" ''
2240+
set -o errexit
2241+
2242+
for file in "$@"; do
2243+
${hooks.circleci.package}/bin/circleci config validate "$file"
2244+
done
2245+
'';
22402246
files = "^.circleci/";
22412247
types = [ "yaml" ];
22422248
};

0 commit comments

Comments
 (0)