We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00b6c3f commit 888d434Copy full SHA for 888d434
command.go
@@ -392,7 +392,12 @@ func (inv *Invocation) run(state *runState) error {
392
var missing []string
393
for _, opt := range inv.Command.Options {
394
if opt.Required && opt.ValueSource == ValueSourceNone {
395
- missing = append(missing, opt.Flag)
+ name := opt.Name
396
+ // use flag as a fallback if name is empty
397
+ if name == "" {
398
+ name = opt.Flag
399
+ }
400
+ missing = append(missing, name)
401
}
402
403
// Don't error for missing flags if `--help` was supplied.
0 commit comments