mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
fix empty newline in version output
When podman is build without git commit information it will print a empty newline instead. This is undesirable and a regression introduced in commit 7d22cc88ef38. To test build podman with `go build -mod=vendor -o bin/podman ./cmd/podman` and check the output of bin/podman version with and without this commit. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -89,9 +89,7 @@ Client:\tPodman Engine
|
|||||||
Version:\t{{.Version}}
|
Version:\t{{.Version}}
|
||||||
API Version:\t{{.APIVersion}}
|
API Version:\t{{.APIVersion}}
|
||||||
Go Version:\t{{.GoVersion}}
|
Go Version:\t{{.GoVersion}}
|
||||||
{{if .GitCommit -}}
|
{{if .GitCommit -}}Git Commit:\t{{.GitCommit}}\n{{end -}}
|
||||||
Git Commit:\t{{.GitCommit}}
|
|
||||||
{{- end}}
|
|
||||||
Built:\t{{.BuiltTime}}
|
Built:\t{{.BuiltTime}}
|
||||||
OS/Arch:\t{{.OsArch}}
|
OS/Arch:\t{{.OsArch}}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
@ -102,9 +100,7 @@ Server:\tPodman Engine
|
|||||||
Version:\t{{.Version}}
|
Version:\t{{.Version}}
|
||||||
API Version:\t{{.APIVersion}}
|
API Version:\t{{.APIVersion}}
|
||||||
Go Version:\t{{.GoVersion}}
|
Go Version:\t{{.GoVersion}}
|
||||||
{{if .GitCommit -}}
|
{{if .GitCommit -}}Git Commit:\t{{.GitCommit}}\n{{end -}}
|
||||||
Git Commit:\t{{.GitCommit}}
|
|
||||||
{{- end}}
|
|
||||||
Built:\t{{.BuiltTime}}
|
Built:\t{{.BuiltTime}}
|
||||||
OS/Arch:\t{{.OsArch}}
|
OS/Arch:\t{{.OsArch}}
|
||||||
{{- end}}{{- end}}
|
{{- end}}{{- end}}
|
||||||
|
Reference in New Issue
Block a user