Skip to content

Commit 8afbe87

Browse files
author
David Arnold
committed
fix: hint possible future per-hook stage implementation
1 parent 29eed70 commit 8afbe87

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/pre-commit.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ let
1717
inherit (pkgs) runCommand writeText git;
1818

1919
cfg = config.pre-commit;
20+
# TODO: add per-hook stages to install here
21+
install_stages = cfg.default_stages;
2022

2123
hookType =
2224
types.submodule (
@@ -335,8 +337,8 @@ in
335337
pre-commit uninstall -t $hook
336338
done
337339
# Add hooks for configured stages (only) ...
338-
if [ ! -z "${concatStringsSep " " cfg.default_stages}" ]; then
339-
for stage in ${concatStringsSep " " cfg.default_stages}; do
340+
if [ ! -z "${concatStringsSep " " install_stages}" ]; then
341+
for stage in ${concatStringsSep " " install_stages}; do
340342
if [[ "$stage" == "manual" ]]; then
341343
continue
342344
fi

0 commit comments

Comments
 (0)