Skip to content

Commit

Permalink
Merge pull request #1131 from cachix/fix-1103
Browse files Browse the repository at this point in the history
pre-commit: don't let hook packages override language ones
  • Loading branch information
domenkozar committed Apr 16, 2024
2 parents 7805484 + 509b72e commit 9b6673e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/integrations/pre-commit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
enterTest = ''
pre-commit run -a
'';
packages = [ config.pre-commit.package ] ++ (config.pre-commit.enabledPackages or [ ]);
# Add the packages for any enabled hooks at the end to avoid overriding the language-defined packages.
packages = lib.mkAfter ([ config.pre-commit.package ] ++ (config.pre-commit.enabledPackages or [ ]));
enterShell = config.pre-commit.installationScript;
};
}

0 comments on commit 9b6673e

Please sign in to comment.