diff --git a/hermes_cli/main.py b/hermes_cli/main.py index c2b5985c232..0870d1586f3 100644 --- a/hermes_cli/main.py +++ b/hermes_cli/main.py @@ -9043,7 +9043,9 @@ def _cmd_update_impl(args, gateway_mode: bool): # Electron build by ``hermes update``. desktop_dir = PROJECT_ROOT / "apps" / "desktop" has_desktop_app = _desktop_packaged_executable(desktop_dir) is not None or _desktop_dist_exists(desktop_dir) - if (desktop_dir / "package.json").exists() and shutil.which("npm") and has_desktop_app: + from hermes_constants import find_node_executable + + if (desktop_dir / "package.json").exists() and find_node_executable("npm") and has_desktop_app: print("→ Checking if desktop app needs rebuilding...") _desktop_build_cmd = [sys.executable, "-m", "hermes_cli.main", "desktop", "--build-only"] # Stream the build output live (long Electron builds otherwise