Skip to content

Commit 959be87

Browse files
author
OpenShift Bot
authored
Merge pull request #13540 from gabemontero/13492
Merged by openshift-bot
2 parents 345cb97 + 334cca2 commit 959be87

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/generate/app/cmd/template.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TransformTemplate(tpl *templateapi.Template, client client.TemplateConfigsN
5050
}
5151

5252
func formatString(out io.Writer, tab, s string) {
53-
labelVals := strings.Split(s, "\n")
53+
labelVals := strings.Split(strings.TrimSuffix(s, "\n"), "\n")
5454

5555
for _, lval := range labelVals {
5656
fmt.Fprintf(out, fmt.Sprintf("%s%s\n", tab, lval))
@@ -83,7 +83,6 @@ func DescribeGeneratedTemplate(out io.Writer, input string, result *templateapi.
8383
formatString(out, " ", message)
8484
fmt.Fprintln(out)
8585
}
86-
fmt.Fprintln(out)
8786
}
8887

8988
if warnings := result.Annotations[app.GenerationWarningAnnotation]; len(warnings) > 0 {

0 commit comments

Comments
 (0)