summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/system/df.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/podman/system/df.go b/cmd/podman/system/df.go
index a320eb5c7..03991101e 100644
--- a/cmd/podman/system/df.go
+++ b/cmd/podman/system/df.go
@@ -4,6 +4,7 @@ import (
"fmt"
"io"
"os"
+ "strconv"
"strings"
"text/tabwriter"
"text/template"
@@ -69,6 +70,14 @@ func printSummary(reports *entities.SystemDfReport, userFormat string) error {
// Images
if len(userFormat) > 0 {
+ if !strings.HasSuffix(userFormat, `\n`) {
+ userFormat += `\n`
+ }
+ // should be Unquoto from cmd line
+ userFormat, err := strconv.Unquote(`"` + userFormat + `"`)
+ if err != nil {
+ return err
+ }
format = userFormat
}