Report failure reason for additional arguments#2950
Open
dfriederich wants to merge 3 commits into
Open
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'