mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 09:04:41 +04:00
Don't crash when an executable is not found
This commit is contained in:
parent
da7e85c851
commit
5a6b6e81e9
5 changed files with 37 additions and 13 deletions
|
|
@ -164,6 +164,16 @@ def test_system_hook_with_spaces(tempdir_factory, store):
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
def test_missing_executable(tempdir_factory, store):
|
||||
_test_hook_repo(
|
||||
tempdir_factory, store, 'not_found_exe',
|
||||
'not-found-exe', ['/dev/null'],
|
||||
b'Executable `i-dont-exist-lol` not found',
|
||||
expected_return_code=1,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
def test_run_a_script_hook(tempdir_factory, store):
|
||||
_test_hook_repo(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue