fix for node healthy() when system executable moves

This commit is contained in:
Anthony Sottile
2020-09-07 13:23:02 -07:00
parent f511afe40e
commit b149c7a344
2 changed files with 41 additions and 3 deletions

View File

@@ -21,7 +21,6 @@ from pre_commit.util import cmd_output
from pre_commit.util import cmd_output_b
ENVIRONMENT_DIR = 'node_env'
healthy = helpers.basic_healthy
@functools.lru_cache(maxsize=1)
@@ -73,6 +72,12 @@ def in_env(
yield
def healthy(prefix: Prefix, language_version: str) -> bool:
with in_env(prefix, language_version):
retcode, _, _ = cmd_output_b('node', '--version', retcode=None)
return retcode == 0
def install_environment(
prefix: Prefix, version: str, additional_dependencies: Sequence[str],
) -> None: