diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-09 13:20:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 13:20:39 -0400 |
commit | ffabd57d6de01c5c65b2e2291b6a6564d28263a0 (patch) | |
tree | 044680b61b05ba97af55cdafb425dd2a8b6b47f7 /cmd/podman/generate/systemd.go | |
parent | 73488369586d387db0e4754fa56d5d0077a24940 (diff) | |
parent | f128bff232a9d9ee14376af83e7f917d3c47ceb8 (diff) | |
download | podman-ffabd57d6de01c5c65b2e2291b6a6564d28263a0.tar.gz podman-ffabd57d6de01c5c65b2e2291b6a6564d28263a0.tar.bz2 podman-ffabd57d6de01c5c65b2e2291b6a6564d28263a0.zip |
Merge pull request #7975 from jwhonce/jira/run-898-4
Restore --format table...
Diffstat (limited to 'cmd/podman/generate/systemd.go')
-rw-r--r-- | cmd/podman/generate/systemd.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/podman/generate/systemd.go b/cmd/podman/generate/systemd.go index f690836a4..02e826549 100644 --- a/cmd/podman/generate/systemd.go +++ b/cmd/podman/generate/systemd.go @@ -6,6 +6,7 @@ import ( "os" "path/filepath" + "github.com/containers/podman/v2/cmd/podman/parse" "github.com/containers/podman/v2/cmd/podman/registry" "github.com/containers/podman/v2/cmd/podman/utils" "github.com/containers/podman/v2/pkg/domain/entities" @@ -97,10 +98,10 @@ func systemd(cmd *cobra.Command, args []string) error { } } - switch format { - case "json": + switch { + case parse.MatchesJSONFormat(format): return printJSON(report.Units) - case "": + case format == "": return printDefault(report.Units) default: return errors.Errorf("unknown --format argument: %s", format) |