mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 18:33:22 +00:00
857c491360
The desktop app's argument loop took `--help` as a view setting named `help` (consuming the next argument as its value) and `-h` as a file to open, so both started the window and a scripted call never returned. `-h` and `--help` now print a short usage, which points scripts to pdfcraft-cli, and exit 0 before any window or log file is created. `--version` and `--help` write through a plain `writeln!` instead of `println!`, which panicked (exit 101) when standard output was full or closed, e.g. `pdfcraft --version > /dev/full`. Release builds on Windows are GUI-subsystem programs, so, as with `--version` already, the text shows when the output is redirected or piped but not in a plain console window. Fixes #4076