fixed wrong converter for bools

Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
Christian Goll
2023-03-22 09:10:23 +01:00
parent 96644be621
commit e27ee11f16

View File

@@ -92,11 +92,11 @@ func createFlags(baseCmd *cobra.Command, excludeList []string,
*/
converters = append(converters, func() error {
if !util.InSlice(GetUnsetVerbs(), *ptr) && *ptr != "" {
if strings.ToLower(*ptr) != "yes" {
if strings.ToLower(*ptr) == "yes" {
*ptr = "true"
return nil
}
if strings.ToLower(*ptr) != "no" {
if strings.ToLower(*ptr) == "no" {
*ptr = "false"
return nil
}