mirror of
https://github.com/storytold/craft-launcher.git
synced 2026-11-02 00:29:49 +00:00
`std::env::args` panics on an argument that is not valid UTF-8, and it panics
while collecting them, before the launcher looks at what it was given. Any
start-up with such an argument ended at
internal error: panicked at library/std/src/env.rs:878:51:
called `Result::unwrap()` on an `Err` value: "/tmp/caf\xE9.png"
with exit 101 and the launcher's own panic report, even for `--version`, which
the packaging smoke test runs on the staged binary.
The launcher looks for two flags and ignores everything else a desktop start-up
brings along (`-psn_0_…` from Finder, a file dropped on the icon, an old login
entry's leftovers), so an argument it cannot read is one it would have ignored
anyway: `args_os`, and a warning in the log naming it.
tests/arguments.rs covers it, and `--version` with the arguments a desktop
adds. Without the change the first test fails with exit 101 and that report.