mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-08 13:12:08 +00:00
refactor(windows): tidy managed-node resolver helpers
Behavior-preserving cleanups on the managed-node resolver: - Hoist _candidate_node_command_names() out of the inner dir loop in find_hermes_node_executable (computed once, not per directory). - Drop redundant os.environ.copy() at the two with_hermes_node_path( os.environ.copy()) sites \u2014 the helper already copies os.environ when called with no argument (verified env-equivalent). - Add reciprocal keep-in-sync comments between iter_hermes_node_dirs() (hermes_constants.py) and hermesManagedNodePathEntries() (electron main.cjs), which mirror the same platform-ordering rule across the Python/Node boundary.
This commit is contained in:
parent
fcc169057d
commit
d4e7dd609d
4 changed files with 12 additions and 3 deletions
|
|
@ -5407,7 +5407,8 @@ def cmd_gui(args: argparse.Namespace):
|
|||
|
||||
from hermes_constants import find_node_executable, with_hermes_node_path
|
||||
|
||||
env = with_hermes_node_path(os.environ.copy())
|
||||
# with_hermes_node_path() copies os.environ when called with no arg.
|
||||
env = with_hermes_node_path()
|
||||
if getattr(args, "fake_boot", False):
|
||||
env["HERMES_DESKTOP_BOOT_FAKE"] = "1"
|
||||
if getattr(args, "ignore_existing", False):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue