mirror of https://github.com/k3s-io/k3s
tolerate missing column headers in server-side print output
parent
dc5f615152
commit
bd559e247c
|
@ -371,6 +371,11 @@ func PrintTable(table *metav1beta1.Table, output io.Writer, options PrintOptions
|
|||
for _, row := range table.Rows {
|
||||
first := true
|
||||
for i, cell := range row.Cells {
|
||||
if i >= len(table.ColumnDefinitions) {
|
||||
// https://issue.k8s.io/66379
|
||||
// don't panic in case of bad output from the server, with more cells than column definitions
|
||||
break
|
||||
}
|
||||
column := table.ColumnDefinitions[i]
|
||||
if !options.Wide && column.Priority != 0 {
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue