fix(update): look up git through the hermes_platform resolver
expose_pm_git() probed with a bare shutil.which, which the managed-runtime resolution guard rejects outside hermes_platform/. Route the lookup through hermes_platform.resolver.locate_command instead.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user