-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1689 from cachix/fix-git-hooks-env-leak
- Loading branch information
Showing
2 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Assert that the pre-commit package does not leak its dependencies into the environment. | ||
{ | ||
git-hooks.hooks.nixfmt-rfc-style.enable = true; | ||
|
||
enterTest = '' | ||
if [ -n "$PYTHONPATH" ]; then | ||
echo "PYTHONPATH is non-empty: $PYTHONPATH" >&2 | ||
echo "The pre-commit package is leaking its dependencies into the environment." >&2 | ||
exit 1 | ||
fi | ||
''; | ||
} |