mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-05 18:19:57 +00:00
- An option took the next token whatever it was, so `--export --scale` wrote a file called `--scale` in the working directory. A token that cannot be a value is refused, and where the value is a path the message offers the shell's own way out (`./-name`). A negative number can still be a value, and `-inf`/`-nan` still reach the check that reports them. - An argument that is not UTF-8 panicked inside `std::env::args`. It is a usage error now, named, since such a path cannot reach the engine anyway. - `<sub> --help` was read as an unknown option by every parser but `script`'s. It answers from the usage block, on stdout, and nothing else happens. Rebased onto the post-split main, where the fix had to grow one part. Upstream has since added a check that an export option sits before its `--export`, and it consumed the following token whatever it was, so `--scale --export out.png` was reported as the *order* of the options -- advice to move an option that is already where it belongs -- when what is wrong is that `--scale` has no value. That check now skips a value only where the next token can be one, and stands aside entirely when a value is missing so the value error speaks. Its own test, `run_export_options_come_before_their_export`, still passes. The CLI's tests moved to tests/it/cli.rs, so the test additions went there.