From d4cbb68cf76a5062bb23ff50b5d3b355eaa86188 Mon Sep 17 00:00:00 2001 From: Sami Alajrami Date: Sun, 6 May 2018 18:21:00 +0200 Subject: [PATCH] trimming spaces in the if statement when getting releases from a specific tiller. --- helm_helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm_helpers.go b/helm_helpers.go index 2b046874..aac606b5 100644 --- a/helm_helpers.go +++ b/helm_helpers.go @@ -47,7 +47,7 @@ func getTillerReleases(tillerNS string) string { // appending tiller-namespace to each release found lines := strings.Split(result, "\n") for i, l := range lines { - if l != "" && !strings.HasPrefix(l, "NAME") && !strings.HasSuffix(l, "NAMESPACE") { + if l != "" && !strings.HasPrefix(strings.TrimSpace(l), "NAME") && !strings.HasSuffix(strings.TrimSpace(l), "NAMESPACE") { lines[i] = strings.TrimSuffix(l, "\n") + " " + tillerNS } }