Skip to content

Commit 36f08e0

Browse files
Fix multiline support
1 parent acf021b commit 36f08e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/clusterctl/cmd/describe_cluster.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ func addObjectRowV1Beta2(prefix string, tbl *tablewriter.Table, objectTree *tree
287287
// - Condition "REASON", "SINCE", "MESSAGE"
288288
msg := strings.Split(rowDescriptor.message, "\n")
289289
msg0 := ""
290-
if len(msg) > 1 {
290+
if len(msg) >= 1 {
291291
msg0 = msg[0]
292292
}
293293
tbl.Append([]string{
@@ -430,7 +430,7 @@ func addOtherConditionsV1Beta2(prefix string, tbl *tablewriter.Table, objectTree
430430

431431
msg := strings.Split(message, "\n")
432432
msg0 := ""
433-
if len(msg) > 1 {
433+
if len(msg) >= 1 {
434434
msg0 = msg[0]
435435
}
436436
tbl.Append([]string{

0 commit comments

Comments
 (0)