Merge pull request #3673 from natasha41575/PanicDuplicateKeys

Return error instead of panicking for duplicate keys
This commit is contained in:
Jeff Regan
2021-03-05 11:55:33 -08:00
committed by GitHub
16 changed files with 125 additions and 31 deletions

View File

@@ -46,7 +46,11 @@ func (w Writer) WriteIndividualFiles(dirPath string, m resmap.ResMap) error {
}
func (w Writer) write(path, fName string, res *resource.Resource) error {
yml, err := yaml.Marshal(res.Map())
m, err := res.Map()
if err != nil {
return err
}
yml, err := yaml.Marshal(m)
if err != nil {
return err
}