You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI: report missing flag values and non-numeric dimensions instead of silently ignoring them #2917
Several option parsers in apps/rustgis-cli/src/main.rs silently ignore missing or invalid values or consume a subsequent flag as a value:
opt() (main.rs:58-60) accepts a following --flag token as the value and returns None if no value follows (e.g. rustgis-cli run --sample --save --cmd 'map.zoomFull' writes a file named --cmd).
Loops for --data (line 236), --plugin (line 855), and --cmd (line 1068) silently skip the option when it is the last argument.
num() (lines 213-215) silently falls back to defaults (1600, 900, 96) when --width, --height, or --dpi is non-numeric or non-finite.
Proposed direction
Align these flags with mcp_register (line 682) and Strict::from_args (line 139): return a clear error (exit code 2) when a value-taking flag lacks a value, when a numeric flag cannot be parsed as a finite positive number, or when a subsequent flag is passed in place of a value. Because turning silent fallbacks into hard errors changes CLI behavior for callers with malformed invocations, this is tracked as a separate decision/change.
I'd like to take this one: I'll refuse a value-taking flag with no value and a non-numeric or non-positive --width/--height/--dpi up front, with exit code 2. PR coming shortly.
Activity
choupeanut commentedon Nov 27, 2026
I'd like to take this one: I'll refuse a value-taking flag with no value and a non-numeric or non-positive
--width/--height/--dpiup front, with exit code 2. PR coming shortly.cli: test that --threads, --image, --client, --name and --port are re…
cli: refuse a bare --threads, --image, --client, --name or --port up …
fix(cli): an option with no value, and a render size that isn't a num…