Files
hermes-agent/tests/hermes_cli
Tranquil-Flow ed7c535ebc fix(gateway): tolerate unresolvable UIDs in launchd plist path lookup (#57292)
Sandboxed/app-hosted macOS shells can expose a UID that pwd.getpwuid
cannot resolve, crashing every launchd-dependent gateway command
(install/status/restart) at the raw getpwuid call inlined into
get_launchd_plist_path() by the service-kind refactor — the same crash
the pre-refactor _launchd_user_home() had.

Keep pwd authoritative when it resolves (profile-home correctness
unchanged) and fall back to the established get_real_home() resolver
(HERMES_REAL_HOME → HOME → pwd → ~, profile home skipped) on
KeyError/ImportError/OSError, so launchd commands degrade gracefully
instead of crashing. Covers both reported crash sites (install path and
_installed_service_kind_for restart path) and all sibling callers.
2026-10-05 16:37:28 -05:00
..