mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-23 17:29:04 -06:00
fix for node healthy() when system executable moves
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user