add additional info to healthy-after-install check

This commit is contained in:
Anthony Sottile 2022-04-16 14:59:46 -04:00
parent 2562c7f796
commit 07554e9525
27 changed files with 137 additions and 79 deletions

View file

@ -73,10 +73,13 @@ def in_env(
yield
def healthy(prefix: Prefix, language_version: str) -> bool:
def health_check(prefix: Prefix, language_version: str) -> str | None:
with in_env(prefix, language_version):
retcode, _, _ = cmd_output_b('node', '--version', retcode=None)
return retcode == 0
if retcode != 0: # pragma: win32 no cover
return f'`node --version` returned {retcode}'
else:
return None
def install_environment(