diff --git a/cmd/uncloud/image/ls.go b/cmd/uncloud/image/ls.go index 91e6dd82..6e6e9ce5 100644 --- a/cmd/uncloud/image/ls.go +++ b/cmd/uncloud/image/ls.go @@ -260,6 +260,14 @@ func formatImageTable(rows []imageRow) string { columns[5].hide = true } + // Hide the "STORE" column if all machines use the containerd store. + hasNonContainerd := slices.ContainsFunc(rows, func(r imageRow) bool { + return r.store != "containerd" + }) + if !hasNonContainerd { + columns[6].hide = true + } + t := tui.NewTable() var headers []string