Skip to content

Commit 4db58cb

Browse files
committed
fix extra lines in new-app output
1 parent ac3b692 commit 4db58cb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/generate/app/cmd/template.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ func formatString(out io.Writer, tab, s string) {
5353
labelVals := strings.Split(s, "\n")
5454

5555
for _, lval := range labelVals {
56-
fmt.Fprintf(out, fmt.Sprintf("%s%s\n", tab, lval))
56+
s := fmt.Sprintf("%s%s\n", tab, lval)
57+
if len(strings.TrimSpace(s)) > 0 {
58+
fmt.Fprintf(out, fmt.Sprintf("%s%s\n", tab, lval))
59+
}
5760
}
5861
}
5962

@@ -83,7 +86,6 @@ func DescribeGeneratedTemplate(out io.Writer, input string, result *templateapi.
8386
formatString(out, " ", message)
8487
fmt.Fprintln(out)
8588
}
86-
fmt.Fprintln(out)
8789
}
8890

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

0 commit comments

Comments
 (0)