Skip to content

The agent that grows with you

fix(update): look up git through the hermes_platform resolver

teknium1e5ccf4a26c7c
diff --git a/hermes_cli/_subprocess_compat.py b/hermes_cli/_subprocess_compat.py
index 096995a538d..3fe7aaab897 100644
--- a/hermes_cli/_subprocess_compat.py
+++ b/hermes_cli/_subprocess_compat.py
@@ -383,7 +383,11 @@ def expose_pm_git() -> None:
the PATH. A machine with a working git is untouched. Raises what
``pm.ensure`` raises.
"""
- if sys.platform != "win32" or shutil.which("git"):
+ if sys.platform != "win32":
+ return
+ from hermes_platform.resolver import locate_command
+
+ if locate_command("git").found:
return
from pm import ensure