Skip to content

Commit

Permalink
fix: Properly convert viber bool/int to string args (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
codablock committed Jun 5, 2023
1 parent 556a3e9 commit 8b09e0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/kluctl/commands/cobra_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ func copyViperValuesToCobraFlags(flags *pflag.FlagSet) error {
if v != nil {
if x, ok := v.(string); ok {
a = []string{x}
} else if x, ok := v.(bool); ok {
a = []string{strconv.FormatBool(x)}
} else if x, ok := v.(int); ok {
a = []string{strconv.FormatInt(int64(x), 10)}
} else if x, ok := v.([]any); ok {
for _, y := range x {
s, ok := y.(string)
Expand Down

0 comments on commit 8b09e0f

Please sign in to comment.