Skip to content

fix(install): build desktop in 'desktop' stage on macOS/Linux instead of silently skipping#36134

Merged
OutThisLife merged 1 commit into
mainfrom
bb/mac-thin-installer
Jun 1, 2026
Merged

fix(install): build desktop in 'desktop' stage on macOS/Linux instead of silently skipping#36134
OutThisLife merged 1 commit into
mainfrom
bb/mac-thin-installer

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Summary

Makes the macOS (and Linux) thin installer path work end-to-end. The Tauri "Hermes Setup" installer (apps/bootstrap-installer) drives scripts/install.sh stage-by-stage, each stage in its own process. The desktop stage never called check_node, so the Hermes-managed Node provisioned during earlier stages ($HERMES_HOME/node/bin) wasn't on PATH. install_desktop's command -v npm check then failed and the build was silently skipped — while still reporting {"ok":true,"skipped":false}.

Result for the user: the installer showed "Installation Complete", then "Launch Hermes" failed with "Couldn't find a built Hermes desktop … the desktop build step may have been skipped or failed."

Changes

  • desktop stage now calls check_node (mirrors every other Node-dependent stage) so the managed Node is on PATH (or gets installed).
  • install_desktop self-provisions via check_node and hard-fails (return 1) if npm is still unavailable, instead of a silent return 0. The desktop stage only runs when a build is explicitly requested (--include-desktop / desktop stage), so a missing toolchain is a genuine failure, not graceful degradation — failing loudly prevents the confusing "complete but no app" state.

Test plan

  • Built the Tauri "Hermes Setup" installer on macOS arm64; install flow runs through every stage.
  • Repro'd the bug: pre-fix run logged ⚠ Skipping desktop build (Node.js / npm not on PATH) and "Launch Hermes" failed.
  • Post-fix: ran the desktop stage with the managed Node only (no system Node) → builds apps/desktop/release/mac-arm64/Hermes.app, which matches resolve_hermes_desktop_exe, so "Launch Hermes" succeeds.
  • bash -n scripts/install.sh passes.

Notes

  • Signing/notarization of the thin wrapper is intentionally deferred (separate follow-up). Tauri picks up APPLE_* signing env vars automatically at build time when we're ready, so no config change is needed here.

… of silently skipping

The thin installer (apps/bootstrap-installer) drives install.sh stage-by-stage,
each in its own process. The `desktop` stage never called check_node, so the
Hermes-managed Node provisioned earlier (at $HERMES_HOME/node/bin) wasn't on
PATH. install_desktop's `command -v npm` check then failed and the build was
skipped — yet the stage still reported {"ok":true,"skipped":false}, so the
installer showed "Installation Complete" and only failed at the end with
"Couldn't find a built Hermes desktop ... the desktop build step may have been
skipped or failed."

Fix:
- Call check_node in the `desktop` stage (mirrors every other Node-dependent
  stage) so the managed Node is on PATH (or installed).
- Make install_desktop self-provision via check_node and hard-fail (return 1)
  if npm is still unavailable, instead of a silent `return 0`. The desktop
  stage only runs when a build is explicitly requested (--include-desktop), so
  an unavailable toolchain is a real failure, not graceful degradation.

Verified on macOS arm64: the `desktop` stage now builds
release/mac-arm64/Hermes.app, which matches resolve_hermes_desktop_exe, so the
installer's "Launch Hermes" succeeds.
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: bb/mac-thin-installer vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9554 on HEAD, 9554 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4953 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@OutThisLife OutThisLife merged commit fa4ebaa into main Jun 1, 2026
20 checks passed
@OutThisLife OutThisLife deleted the bb/mac-thin-installer branch June 1, 2026 00:03
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels Jun 1, 2026

@mxnstrexgl mxnstrexgl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — automated review passed. No security, quality, or test coverage issues detected.

JoeKowal pushed a commit to JoeKowal/hermes-agent that referenced this pull request Jun 4, 2026
… of silently skipping (NousResearch#36134)

The thin installer (apps/bootstrap-installer) drives install.sh stage-by-stage,
each in its own process. The `desktop` stage never called check_node, so the
Hermes-managed Node provisioned earlier (at $HERMES_HOME/node/bin) wasn't on
PATH. install_desktop's `command -v npm` check then failed and the build was
skipped — yet the stage still reported {"ok":true,"skipped":false}, so the
installer showed "Installation Complete" and only failed at the end with
"Couldn't find a built Hermes desktop ... the desktop build step may have been
skipped or failed."

Fix:
- Call check_node in the `desktop` stage (mirrors every other Node-dependent
  stage) so the managed Node is on PATH (or installed).
- Make install_desktop self-provision via check_node and hard-fail (return 1)
  if npm is still unavailable, instead of a silent `return 0`. The desktop
  stage only runs when a build is explicitly requested (--include-desktop), so
  an unavailable toolchain is a real failure, not graceful degradation.

Verified on macOS arm64: the `desktop` stage now builds
release/mac-arm64/Hermes.app, which matches resolve_hermes_desktop_exe, so the
installer's "Launch Hermes" succeeds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants