From 4fbf2ebf4ec175588cf7fa3c06b503639d1984b8 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Fri, 30 Jun 2023 11:17:31 +0200 Subject: [PATCH 1/2] Fix nil error reference --- internal/packages/changelog/yaml.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/packages/changelog/yaml.go b/internal/packages/changelog/yaml.go index 119fb96d24..99e0f10db4 100644 --- a/internal/packages/changelog/yaml.go +++ b/internal/packages/changelog/yaml.go @@ -108,7 +108,7 @@ func SetManifestVersion(d []byte, version string) ([]byte, error) { // Manifest is a document, with a single element, that should be a map. if len(node.Content) == 0 || node.Content[0].Kind != yaml.MappingNode { - return nil, fmt.Errorf("unexpected manifest content: %w", err) + return nil, errors.New("unexpected manifest content") } setYamlMapValue(node.Content[0], "version", version) From ab8d36a64cc8541ea513a5cab26f3d4b98feda87 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Fri, 30 Jun 2023 12:14:59 +0200 Subject: [PATCH 2/2] Update internal/packages/changelog/yaml.go Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com> --- internal/packages/changelog/yaml.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/packages/changelog/yaml.go b/internal/packages/changelog/yaml.go index 99e0f10db4..31f0ec620d 100644 --- a/internal/packages/changelog/yaml.go +++ b/internal/packages/changelog/yaml.go @@ -108,7 +108,7 @@ func SetManifestVersion(d []byte, version string) ([]byte, error) { // Manifest is a document, with a single element, that should be a map. if len(node.Content) == 0 || node.Content[0].Kind != yaml.MappingNode { - return nil, errors.New("unexpected manifest content") + return nil, errors.New("unexpected manifest content: not a map") } setYamlMapValue(node.Content[0], "version", version)