Skip to content

Commit

Permalink
chore: make type field case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Nov 18, 2024
1 parent d16f5b5 commit 60d0440
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkg/cli/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,16 @@ func parseManifests(data []byte) (result []manifest, _ error) {
return nil, err
}

typeName, _ := parsed["type"].(string)
var typeName string
for k, v := range parsed {
if strings.EqualFold(k, "type") {
typeName, _ = v.(string)
if typeName != "" {
break
}
}
}

if typeName == "" {
return nil, fmt.Errorf("missing type field in manifest")
}
Expand Down

0 comments on commit 60d0440

Please sign in to comment.