mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-29 09:13:19 -06:00
The Launcher starts a nightly as `--launch-profile nightly-v1 --profile-root <dir> --` and `launch_profile::parse` hands the window `--` followed by the file names. The argument scan in `main` had no arm for the separator, so it was opened as a file: every nightly launch showed the alert `--: No such file or directory (os error 2)` (Mac smoke of run 45749038918). The scan moves into `desktop_args`, where `--` ends the options and everything after it is a file. `main` keeps its `--control`, `--control-token` and `--sample` handling unchanged. The same smoke showed a refused launch hanging on macOS with no window: the refusal opened rfd's message box before eframe's event loop, and that alert needs the AppKit run loop this start never reaches. `refusal_dialog` now adds the box only where one renders on its own (Windows, X11/Wayland); macOS gets the reason on standard error and the caller's exit status 2. Unit tests cover both argvs the Launcher sends, a file named like a flag after the separator, and the dialog rule.