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

Reqflagr #1129

Merged
merged 2 commits into from
May 4, 2020
Merged

Reqflagr #1129

merged 2 commits into from
May 4, 2020

Conversation

oleorhagen
Copy link
Contributor

What type of PR is this?

Port of a regression test from v1

  • bug
  • cleanup
  • documentation
  • feature
    -[x] test

What this PR does / why we need it:

Which issue(s) this PR fixes:

(REQUIRED)

Special notes for your reviewer:

(fill-in or delete this section)

Testing

Tests that missing required flags will result in the long option being stored in the error message in requiredFlagsErr

Release Notes

(REQUIRED)


This adds a test verifying that the requiredFlagsError does contain the long
option of the missing flag, instead of the short option and a space, which was
the old behaviour.

Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
(cherry picked from commit f842187)
@oleorhagen oleorhagen requested a review from a team as a code owner May 3, 2020 09:13
@oleorhagen oleorhagen requested review from saschagrunert and asahasrabuddhe and removed request for a team May 3, 2020 09:13
StringSliceFlag needs to be a pointer, and not a struct. Also formatted the test.

See: urfave#1126 for a description of the regression
tested for.

Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
@oleorhagen
Copy link
Contributor Author

See comment: #1126 (comment) for an explanation

If not @rliebz will handle it directly.

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@coilysiren coilysiren left a comment

Choose a reason for hiding this comment

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

Thanks for porting this over to master 👍

@coilysiren coilysiren merged commit fdf2d38 into urfave:master May 4, 2020
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.

None yet

3 participants