require healthy() after installation

This commit is contained in:
Anthony Sottile 2020-07-15 21:07:21 -07:00
parent 2f1d4d10e0
commit 7da72563dd

View file

@ -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))