Skip to content

Report failure reason for additional arguments#2950

Open
dfriederich wants to merge 3 commits into
LunarG:devfrom
sarc-acl:replay_cmd_error
Open

Report failure reason for additional arguments#2950
dfriederich wants to merge 3 commits into
LunarG:devfrom
sarc-acl:replay_cmd_error

Conversation

@dfriederich
Copy link
Copy Markdown
Contributor

When passing additional, unexpected arguments to the replay app, it did just show the command line help, but not actually issue any hint about the actual command line failure.

For example on Android, we treat a single space as argument separator.
Hence using 2 spaces, as in '--dump-resources-dir /sdcard/output' did cause the issue, just showing the usage help without any hint of what detail failed.
Fixes the non reporting of the failure reason, now it fails with

Unexpected positional argument '/sdcard/output'

When passing additional, unexpected arguments to the replay app,
it did just show the command line help, but not actually issue
any hint about the actual command line failure.
For example on Android, we treat a single space as argument separator,
an unexpected behavior which this PR does not change. But it caused
that the option part '--dump-resources-dir  /sdcard/output' did just
fail with the options being printed due to having 2 spaces after
--dump-resources-dir.
Fixes the non reporting of the failure reason, now it fails with
that /sdcard/output is an unexpected positional argument, helping to
pinpoint the issue much close. I do think we should report this issue,
regardless of if we do change the surprising behavior of using a single
space as separator (and not a sequence of whitespace).
@dfriederich dfriederich requested a review from a team as a code owner May 14, 2026 20:12
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 14, 2026

CLA assistant check
All committers have signed the CLA.

Comment thread tools/replay/android_main.cpp
Comment thread tools/replay/android_main.cpp Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants