summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorBoaz Shuster <boaz.shuster.github@gmail.com>2022-06-22 12:26:59 +0300
committerBoaz Shuster <boaz.shuster.github@gmail.com>2022-06-23 21:36:52 +0300
commitf0b9e56e98e0adc3f0b0e736f36b4c964430b4e5 (patch)
tree7f1ef62e9e7be4e5bc99bd04e3dcfafca913db36 /cmd/podman
parent15a651f860191a6cfe0b3d5f1c0a846e6a584091 (diff)
downloadpodman-f0b9e56e98e0adc3f0b0e736f36b4c964430b4e5.tar.gz
podman-f0b9e56e98e0adc3f0b0e736f36b4c964430b4e5.tar.bz2
podman-f0b9e56e98e0adc3f0b0e736f36b4c964430b4e5.zip
Fix machine list: --format implies --noheading
It seems like previously if --format was changed then listFlag.noHeading is changed accordingly however printHeader is used to determine whether to print header or not. This patch fixes that problem. Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/machine/list.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go
index bb14d4a67..1ffb8690c 100644
--- a/cmd/podman/machine/list.go
+++ b/cmd/podman/machine/list.go
@@ -138,7 +138,7 @@ func outputTemplate(cmd *cobra.Command, responses []*ListReporter) error {
switch {
case cmd.Flags().Changed("format"):
row = cmd.Flag("format").Value.String()
- listFlag.noHeading = !report.HasTable(row)
+ printHeader = report.HasTable(row)
row = report.NormalizeFormat(row)
default:
row = cmd.Flag("format").Value.String()