diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-19 07:00:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-19 07:00:25 +0000 |
commit | a5907b904f568d3249b7629ea9ff3b932f723ce3 (patch) | |
tree | b82c427c125ea5fcf9d1e2fb48e4a529fc932fba /pre_commit/repository.py | |
parent | Adding upstream version 2.18.1. (diff) | |
download | pre-commit-a5907b904f568d3249b7629ea9ff3b932f723ce3.tar.xz pre-commit-a5907b904f568d3249b7629ea9ff3b932f723ce3.zip |
Adding upstream version 2.19.0.upstream/2.19.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/repository.py')
-rw-r--r-- | pre_commit/repository.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pre_commit/repository.py b/pre_commit/repository.py index ac5d294..4092277 100644 --- a/pre_commit/repository.py +++ b/pre_commit/repository.py @@ -57,7 +57,7 @@ def _hook_installed(hook: Hook) -> bool: _read_state(hook.prefix, venv) == _state(hook.additional_dependencies) ) and - lang.healthy(hook.prefix, hook.language_version) + not lang.health_check(hook.prefix, hook.language_version) ) ) @@ -79,11 +79,13 @@ def _hook_install(hook: Hook) -> None: lang.install_environment( hook.prefix, hook.language_version, hook.additional_dependencies, ) - if not lang.healthy(hook.prefix, hook.language_version): + health_error = lang.health_check(hook.prefix, hook.language_version) + if health_error: raise AssertionError( - f'BUG: expected environment for {hook.language} to be healthy() ' + f'BUG: expected environment for {hook.language} to be healthy ' f'immediately after install, please open an issue describing ' - f'your environment', + f'your environment\n\n' + f'more info:\n\n{health_error}', ) # Write our state to indicate we're installed _write_state(hook.prefix, venv, _state(hook.additional_dependencies)) |