From 370d154dc3276bda1b01bcb9c820c52f25ad955b Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Sat, 13 Apr 2024 15:47:40 +0800 Subject: [PATCH] fix: replace CRLF * source from https://github.com/helm/helm-mapkubeapis/issues/110 --- pkg/v3/release.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/v3/release.go b/pkg/v3/release.go index 203e80d..615d3ae 100644 --- a/pkg/v3/release.go +++ b/pkg/v3/release.go @@ -19,6 +19,7 @@ package v3 import ( "fmt" "log" + "strings" "github.com/pkg/errors" @@ -44,7 +45,7 @@ func MapReleaseWithUnSupportedAPIs(mapOptions common.MapOptions) error { } log.Printf("Check release '%s' for deprecated or removed APIs...\n", releaseName) - var origManifest = releaseToMap.Manifest + var origManifest = strings.Replace(releaseToMap.Manifest, "\r\n", "\n", -1) modifiedManifest, err := common.ReplaceManifestUnSupportedAPIs(origManifest, mapOptions.MapFile, mapOptions.KubeConfig) if err != nil { return err