Files
craft-launcher/apps
Hamza Naveed 00a7394fe1 An argument that is not UTF-8 is ignored, not the end of the start-up (#730)
`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.
2026-10-24 01:43:24 -04:00
..