summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/root.go4
-rw-r--r--cmd/podman/system/version.go5
2 files changed, 1 insertions, 8 deletions
diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index d079018a0..8def7112f 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -80,10 +80,6 @@ func init() {
)
rootFlags(rootCmd, registry.PodmanConfig())
-
- // "version" is a local flag to avoid collisions with sub-commands that use "-v"
- var dummyVersion bool
- rootCmd.Flags().BoolVarP(&dummyVersion, "version", "v", false, "Version of Podman")
}
func Execute() {
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 {