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

fix permanent-peer, no-color and verbose output cli args #996

Merged
merged 1 commit into from
Jun 27, 2016

Conversation

bookshelfdave
Copy link
Contributor

@bookshelfdave bookshelfdave commented Jun 27, 2016

Clap args that don't take a param (--permanent-peer, --no-color and -v) weren't recognized with:

    if sub_args.value_of("foo").is_some() {...

as they never have a value. Instead, we use

    if sub_args.is_present("foo") {...

Additionally, verbose and no-color flags are marked as "global", but are registered in sub_args instead of args in fn config_from_args. I removed args as we aren't using that struct any more.

cc @thommay

@thesentinels
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @fnichol, @reset, @adamhjk and @kmacgugan to be potential reviewers

@bookshelfdave bookshelfdave changed the title valueless clap args always returned None, should be using is_present fix permanent-peer, no-color and verbose output cli args Jun 27, 2016
@thommay
Copy link

thommay commented Jun 27, 2016

👍

@reset
Copy link
Collaborator

reset commented Jun 27, 2016

@thesentinels r+

gif-keyboard-3228342543782315735

@smith
Copy link
Contributor

smith commented Jun 27, 2016

@thesentinels r+

@thesentinels
Copy link
Contributor

📌 Commit 2c3855a has been approved by smith

@thesentinels
Copy link
Contributor

⌛ Testing commit 2c3855a with merge 0ffb1d6...

thesentinels added a commit that referenced this pull request Jun 27, 2016
fix permanent-peer, no-color and verbose output cli args

Clap args that don't take a param (`--permanent-peer`, `--no-color` and `-v`) weren't recognized with:

        if sub_args.value_of("foo").is_some() {...

as they never have a value. Instead, we use

        if sub_args.is_present("foo") {...

Additionally, verbose and no-color flags are marked as "global", but are registered in `sub_args` instead of `args` in `fn config_from_args`. I removed `args` as we aren't using that struct any more.

cc @thommay
@thesentinels
Copy link
Contributor

☀️ Test successful - travis

@thesentinels thesentinels merged commit 2c3855a into master Jun 27, 2016
@bookshelfdave bookshelfdave deleted the dp_fix_args_with_params branch July 12, 2016 13:56
@eeyun eeyun added C-bug and removed Bug labels Jun 6, 2017
@christophermaier christophermaier added Type: Bug Issues that describe broken functionality and removed C-bug labels Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues that describe broken functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants