Skip to content

Commit

Permalink
trimming spaces in the if statement when getting releases from a spec…
Browse files Browse the repository at this point in the history
…ific tiller.
  • Loading branch information
Sami Alajrami committed May 6, 2018
1 parent 3acaf98 commit d4cbb68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helm_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit d4cbb68

Please sign in to comment.