You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c673b59
Browse filesBrowse the repository at this point in the historyBrowse files
Fix missing macOS launcher with administratorRequired (#473, #398)
The launcher was only copied when administratorRequired was false, so the
'startup' helper script called a universalJavaApplicationStub that didn't
exist. Always copy the launcher and invoke it by its real name from
startup.vtl, so customLauncher also works in admin mode.
The admin smoke test job is no longer allowed to fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# macOS app with administratorRequired has no launcher (#473, #398)
2
+
3
+
## Problem
4
+
5
+
With `administratorRequired=true`, the macOS app does nothing after the user enters the admin password (#398). `Contents/MacOS/universalJavaApplicationStub` is missing from the bundle (#473). Reproduced by the macOS smoke tests (run 37165552012, job `macos-15 / SCRIPT / admin`).
6
+
7
+
## Cause
8
+
9
+
`MacPackager.processStartupScript()` only copied the launcher (precompiled stub or `customLauncher`) in the non-admin branch. In admin mode it only rendered the `startup` helper script, and `mac/startup.vtl` invoked a hardcoded `universalJavaApplicationStub` that was never copied.
10
+
11
+
## Solution
12
+
13
+
-`processStartupScript()` always copies the launcher to `Contents/MacOS` and keeps it in a new `launcher` field (`getLauncher()`). In admin mode `startup` is the executable; otherwise the launcher is.
14
+
-`mac/startup.vtl` invokes `$SCRIPTPATH/${info.launcher.name}` instead of the hardcoded name, so `customLauncher` also works in admin mode.
15
+
- Custom `startup.vtl` templates in users' `assetsDir` keep working: the default launcher is still named `universalJavaApplicationStub`.
16
+
- The smoke test checks that the `startup` script invokes an existing launcher, and the admin job no longer has `continue-on-error`.
17
+
18
+
## Verification
19
+
20
+
- macOS smoke tests: the admin job must pass (launcher present, invoked by `startup`).
21
+
- Not verifiable in CI: the password prompt and the app actually starting with admin rights. #398 reporters said a similar fix (branch `issue-398`, before the native launcher) still didn't start the app. Ask them to test a snapshot before closing #398. #473 can be closed with this fix.
0 commit comments