mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #1535 from pre-commit/require_healthy_after_install
require healthy() after installation
This commit is contained in:
commit
0e851bdf75
1 changed files with 6 additions and 0 deletions
|
|
@ -82,6 +82,12 @@ 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):
|
||||
raise AssertionError(
|
||||
f'BUG: expected environment for {hook.language} to be healthy() '
|
||||
f'immediately after install, please open an issue describing '
|
||||
f'your environment',
|
||||
)
|
||||
# Write our state to indicate we're installed
|
||||
_write_state(hook.prefix, venv, _state(hook.additional_dependencies))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue