summaryrefslogtreecommitdiff
path: root/cmd/podman/volumes/list.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/volumes/list.go')
-rw-r--r--cmd/podman/volumes/list.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/podman/volumes/list.go b/cmd/podman/volumes/list.go
index 0243054af..c372527de 100644
--- a/cmd/podman/volumes/list.go
+++ b/cmd/podman/volumes/list.go
@@ -97,9 +97,14 @@ func outputTemplate(cmd *cobra.Command, responses []*entities.VolumeListReport)
"Name": "VOLUME NAME",
})
- row := report.NormalizeFormat(cliOpts.Format)
- if cliOpts.Quiet {
+ var row string
+ switch {
+ case cliOpts.Quiet:
row = "{{.Name}}\n"
+ case cmd.Flags().Changed("format"):
+ row = report.NormalizeFormat(cliOpts.Format)
+ default:
+ row = cmd.Flag("format").Value.String()
}
format := report.EnforceRange(row)