diff options
Diffstat (limited to 'cmd/podman/system')
-rw-r--r-- | cmd/podman/system/version.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cmd/podman/system/version.go b/cmd/podman/system/version.go index edc860d0e..9da7da54a 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 { @@ -86,7 +83,7 @@ func version(cmd *cobra.Command, args []string) error { func formatVersion(writer io.Writer, version *define.Version) { fmt.Fprintf(writer, "Version:\t%s\n", version.Version) - fmt.Fprintf(writer, "API Version:\t%d\n", version.APIVersion) + fmt.Fprintf(writer, "API Version:\t%s\n", version.APIVersion) fmt.Fprintf(writer, "Go Version:\t%s\n", version.GoVersion) if version.GitCommit != "" { fmt.Fprintf(writer, "Git Commit:\t%s\n", version.GitCommit) |