git-hooks.nix icon indicating copy to clipboard operation
git-hooks.nix copied to clipboard

pre-commit is added to the end of PATH

Open zliu41 opened this issue 3 years ago • 1 comments

When using nix-pre-commit-hooks, /nix/store/...python3.9-pre-commit-2.17.0/bin is added to the end of PATH, possibly by this. This causes the wrong pre-commit to be used if you already have one in, say, $HOME/.local/bin.

zliu41 avatar Jun 08 '22 14:06 zliu41

You'll want to set the package option to match the pre-commit you want to use in your shell anyway, so that the CI check uses the same version that you use in the shell. If you do so, the built-in appending to PATH will be harmless.

roberth avatar Jun 08 '22 15:06 roberth