Skip to content

fix categorized flags alongside non categorized #1672

@skelouse

Description

@skelouse

My urfave/cli version is

latest v2

Checklist

  • Are you running the latest v2 release? The list of releases is here.
  • Did you check the manual for your release? The v2 manual is here
  • Did you perform a search about this problem? Here's the GitHub guide about searching.

Describe the bug

Commit: 8227be1
introduced a backward compatibility issue. As before non categorized flags would show alongside categorized flags. After this commit non categorized do not show at all.

To reproduce

TestCommand_VisibleFlagCategories is a direct test of the breaking change, Just because no category is set, the flag should not be invisible.

Expected behavior

Flags should show in help unless explicitly hidden

Want to fix this yourself?

Sure, I'll introduce a PR shortly

Run go version and paste its output here

go version go1.19.4 linux/amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/v2relates to / is being considered for v2kind/bugdescribes or fixes a bugstatus/triagemaintainers still need to look into this

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions