urfave / cli

A simple, fast, and fun package for building command line apps in Go
https://cli.urfave.org
MIT License
22.22k stars 1.7k forks source link

Fix:(issue_1930) Fix for invalid bool counts #1941

Closed dearchap closed 3 months ago

dearchap commented 3 months ago

What type of PR is this?

(REQUIRED)

What this PR does / why we need it:

(REQUIRED)

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #1930 Fixes #1929

Special notes for your reviewer:

(fill-in or delete this section)

Testing

(fill-in or delete this section)

go test -run=TestCommand_Value go test -run=TestBoolFlagCountFromCommand

Release Notes

(REQUIRED)

The normalizeFlags function is redundant and causes the value.Set to be triggered for every alias which in turn increments count for flag unnecessarily. This function is a holdover from very very old code and has been removed. This fixes the count issue and also allows multiple aliases of same flag to be used without any errors. 
Skeeve commented 3 months ago

Are there any plans as to when alpha10 will be released?