Skip to content

Commit

Permalink
fix: render int and bool types
Browse files Browse the repository at this point in the history
Handles int and bool types when returned as string map value.

Resolves: helmfile#114 and helmfile#190
Signed-off-by: Bernardo Salazar <bernardo.salazar@weareadaptive.com>
  • Loading branch information
bersalazar committed Dec 31, 2023
1 parent 121ff68 commit bb02e52
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vals.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ func (r *Runtime) prepare() (*expansion.ExpandRegexMatch, error) {
for i, k := range keys {
newobj := map[string]interface{}{}
switch t := obj[k].(type) {
case int:
return fmt.Sprint(t), nil
case bool:
return fmt.Sprint(t), nil
case string:
if i != len(keys)-1 {
return "", fmt.Errorf("unexpected type of value for key at %d=%s in %v: expected map[string]interface{}, got %v(%T)", i, k, keys, t, t)
Expand Down

0 comments on commit bb02e52

Please sign in to comment.