Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shorter output when option is incorrect #214

Merged

Conversation

vlevigneron
Copy link
Contributor

@vlevigneron vlevigneron commented Jul 30, 2021

Purpose

This PR does no longer display full usage in case of incorrect option

Context

Fixes #160

Changes

Add 'pass_through' option to MooseX::Getopt::GLD prevents print of a systematic 'usage'.

How to test this PR

use invalid option(s), the output will look like

zonemaster-cli --jljlkfg --list_tests
Unknown option: --jljlkfg
Run "zonemaster-cli -h" to get the valid options

@vlevigneron vlevigneron changed the base branch from master to develop July 30, 2021 12:40
@vlevigneron vlevigneron requested review from matsduf and mattias-p July 30, 2021 12:40
@matsduf matsduf added this to the v2021.2 milestone Jul 30, 2021
Copy link
Contributor

@matsduf matsduf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I run a test?

# zonemaster-cli iis.se
Unknown option: iis.se 
Run "zonemaster-cli -h" to get the valid options

@vlevigneron
Copy link
Contributor Author

@matsduf it seems I have been too fast to conclude it works...

@vlevigneron
Copy link
Contributor Author

@matsduf It should be OK now

@vlevigneron vlevigneron requested a review from matsduf July 30, 2021 14:04
@matsduf
Copy link
Contributor

matsduf commented Jul 30, 2021

This is an improvement. Is it possible to make "-h" output the equivalent of perldoc zonemaster-cli? I guess that is part of issue #68.

@vlevigneron
Copy link
Contributor Author

Yes this is part of #68, I'll check what is possible to do.

@vlevigneron vlevigneron merged commit f22cf08 into zonemaster:develop Jul 30, 2021
@hannaeko hannaeko self-assigned this Nov 25, 2021
@hannaeko hannaeko added the S-ReleaseTested Status: The PR has been successfully tested in release testing label Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-ReleaseTested Status: The PR has been successfully tested in release testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unhelpful output when option is incorrect
3 participants