Skip to content

Commit

Permalink
tests: assert that pre-commit doesn't leak its dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Jan 27, 2025
1 parent a0f7137 commit 44d6123
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/git-hooks-no-python-leak/devenv.nix
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
'';
}

0 comments on commit 44d6123

Please sign in to comment.