Cover absent/no-distro bash.exe in hooks "not from cwd" test · gitpython-developers/GitPython@a42ea0a · GitHub
Skip to content

Commit a42ea0a

Browse files
committed
Cover absent/no-distro bash.exe in hooks "not from cwd" test
See comments for details on the test's new implementation and what it achieves.
1 parent 7751436 commit a42ea0a

3 files changed

Lines changed: 49 additions & 24 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion

test/fixtures/polyglot

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env sh
2+
# Valid script in both Bash and Python, but with different behavior.
3+
""":"
4+
echo 'Ran intended hook.' >output.txt
5+
exit
6+
" """
7+
from pathlib import Path
8+
Path('payload.txt').write_text('Ran impostor hook!', encoding='utf-8')

test/test_index.py

Lines changed: 40 additions & 23 deletions

0 commit comments

Comments
 (0)