summaryrefslogtreecommitdiff
path: root/cmd/podman/system/version.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-17 09:40:10 -0400
committerGitHub <noreply@github.com>2020-09-17 09:40:10 -0400
commitc8d90d00c38a78c3219e5c99a43bd900f903de8b (patch)
treebd61a7afdac163f22e2e46feecc170afcf2a4d53 /cmd/podman/system/version.go
parentd8414add00da27098267b8bd400cb5b045e8be96 (diff)
parentdb86ea9bcadd58197db54da7a9b7c3d5e5c52cf8 (diff)
downloadpodman-c8d90d00c38a78c3219e5c99a43bd900f903de8b.tar.gz
podman-c8d90d00c38a78c3219e5c99a43bd900f903de8b.tar.bz2
podman-c8d90d00c38a78c3219e5c99a43bd900f903de8b.zip
Merge pull request #7646 from edsantiago/version_options
podman version and --version: fix format, exit
Diffstat (limited to 'cmd/podman/system/version.go')
-rw-r--r--cmd/podman/system/version.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd/podman/system/version.go b/cmd/podman/system/version.go
index edc860d0e..5f39b4820 100644
--- a/cmd/podman/system/version.go
+++ b/cmd/podman/system/version.go
@@ -47,12 +47,9 @@ func version(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
- _, err = io.WriteString(os.Stdout, s)
+ _, err = io.WriteString(os.Stdout, s+"\n")
return err
case cmd.Flag("format").Changed:
- if !strings.HasSuffix(versionFormat, "\n") {
- versionFormat += "\n"
- }
out := formats.StdoutTemplate{Output: versions, Template: versionFormat}
err := out.Out()
if err != nil {