mirror of
https://github.com/spf13/cobra
synced 2025-01-30 23:46:45 +00:00
update error message to be more readable
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
This commit is contained in:
parent
23cadf7ab4
commit
ad5e8c3579
1 changed files with 2 additions and 2 deletions
|
@ -254,8 +254,8 @@ func validateIfPresentThenRequiredFlagGroups(data map[string]map[string]bool) er
|
||||||
// If any dependent flags are unset, trigger an error
|
// If any dependent flags are unset, trigger an error
|
||||||
if len(unset) > 0 {
|
if len(unset) > 0 {
|
||||||
return fmt.Errorf(
|
return fmt.Errorf(
|
||||||
"if the first flag in the group [%v] is set, all other flags must be set; the following flags are not set: %v",
|
"%v is set, the following flags must be provided: %v",
|
||||||
flagList, unset,
|
flagList[0], unset,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue