summaryrefslogtreecommitdiffstats
path: root/pre_commit/languages/node.py
diff options
context:
space:
mode:
Diffstat (limited to 'pre_commit/languages/node.py')
-rw-r--r--pre_commit/languages/node.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pre_commit/languages/node.py b/pre_commit/languages/node.py
index b084e8f..39f3000 100644
--- a/pre_commit/languages/node.py
+++ b/pre_commit/languages/node.py
@@ -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(