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

mandatory getOption #442

Closed
MartinNowak opened this Issue Dec 20, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@MartinNowak
Contributor

MartinNowak commented Dec 20, 2013

Currently I have to write a redundant error message if a mandatory argument is missing.

    enforce(getOption("work-tree|w", &workTree, "Sets the work tree of the wiki git repo."),
            "Missing mandatory --work-tree argument.");

It would be nice if getOption with a boolean flag or forceGetOption could do the enforce check, because they could automatically produce an error message.
Here it could look like this.

Missing mandatory argument: -w|--work-tree.
    -w <value>, --work-tree=<value>
                     Sets the work tree of the wiki git
                     repo.

@s-ludwig s-ludwig closed this in 7f0393b Jan 12, 2014

@MartinNowak

This comment has been minimized.

Show comment
Hide comment
@MartinNowak

MartinNowak Jan 12, 2014

Contributor

Thanks

Contributor

MartinNowak commented Jan 12, 2014

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment