diff --git a/pkg/utils/yaml_utils/yaml_utils.go b/pkg/utils/yaml_utils/yaml_utils.go index 391ba8a4f..5f2532a3d 100644 --- a/pkg/utils/yaml_utils/yaml_utils.go +++ b/pkg/utils/yaml_utils/yaml_utils.go @@ -73,11 +73,7 @@ func RenameYamlKey(rootNode *yaml.Node, path []string, newKey string) error { body := rootNode.Content[0] - if err := renameYamlKey(body, path, newKey); err != nil { - return err - } - - return nil + return renameYamlKey(body, path, newKey) } // Recursive function to rename the YAML key.