diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-07-30 15:14:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-30 15:14:49 -0400 |
commit | 4132b71478c486b3f4eff6a344ee1b2defbab86f (patch) | |
tree | 1a9f74331aea2ca0657b7f4222197bec09abb98e /cmd | |
parent | ca2bda64206134a4b1bec5f8934bf6a3c46cfbfd (diff) | |
parent | b4fa2c2517fd313bb0000f7697274d2ab2498265 (diff) | |
download | podman-4132b71478c486b3f4eff6a344ee1b2defbab86f.tar.gz podman-4132b71478c486b3f4eff6a344ee1b2defbab86f.tar.bz2 podman-4132b71478c486b3f4eff6a344ee1b2defbab86f.zip |
Merge pull request #7156 from zhangguanzhang/master
fix podman system df format error
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/system/df.go | 9 |
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 } |