Repository navigation
Commit 75691d8
committed
fix: skip AllowExtFlags flags in the duplicate name check
With AllowExtFlags, the Go flags that other packages register on
flag.CommandLine are appended to cmd.Flags. glog, for example, registers
-v in init(), so a command with its own -v flag now failed:
foo -v # flag "v" defined multiple times
The user can't rename a flag that belongs to a dependency. Skip ext
flags in the check so the user flag wins again, as before this change.
Assisted-by: claude:claude-opus-5-5
Signed-off-by: Eng Zer Jun <[email protected]>1 parent 0f36b6e commit 75691d8
2 files changed
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
191 | 196 | | |
192 | 197 | | |
193 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4048 | 4048 | | |
4049 | 4049 | | |
4050 | 4050 | | |
| 4051 | + | |
| 4052 | + | |
| 4053 | + | |
| 4054 | + | |
| 4055 | + | |
| 4056 | + | |
| 4057 | + | |
| 4058 | + | |
| 4059 | + | |
| 4060 | + | |
| 4061 | + | |
| 4062 | + | |
| 4063 | + | |
| 4064 | + | |
| 4065 | + | |
| 4066 | + | |
| 4067 | + | |
| 4068 | + | |
| 4069 | + | |
| 4070 | + | |
| 4071 | + | |
| 4072 | + | |
| 4073 | + | |
| 4074 | + | |
| 4075 | + | |
4051 | 4076 | | |
4052 | 4077 | | |
4053 | 4078 | | |
| |||
0 commit comments