Skip to content

Commit a7f9375

Browse files
committed
Fix version output in help
Before: ``` VERSION: 1.30.2 Version: 1.30.2 GitCommit: unknown GitCommitDate: unknown GitTreeState: clean BuildDate: 1980-01-01T00:00:00Z GoVersion: go1.22.3 Compiler: gc Platform: linux/amd64 Linkmode: dynamic BuildTags: apparmor seccomp selinux containers_image_openpgp containers_image_ostree_stub LDFlags: unknown SeccompEnabled: true AppArmorEnabled: false DESCRIPTION: OCI-based implementation of Kubernetes Container Runtime Interface ``` After: ``` VERSION: Version: 1.31.0 GitCommit: f68b12ced5b49799aaa42097540def6a67dc6643 GitCommitDate: 2024-07-02T10:59:18Z GitTreeState: clean BuildDate: 1980-01-01T00:00:00Z GoVersion: go1.22.3 Compiler: gc Platform: linux/amd64 Linkmode: dynamic BuildTags: containers_image_ostree_stub apparmor containers_image_openpgp seccomp selinux exclude_graphdriver_devicemapper LDFlags: unknown SeccompEnabled: true AppArmorEnabled: false DESCRIPTION: OCI-based implementation of Kubernetes Container Runtime Interface ``` Signed-off-by: Sascha Grunert <[email protected]>
1 parent c8ea300 commit a7f9375

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/crio/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func main() {
132132
logrus.Fatal(err)
133133
}
134134

135-
app.Version = version.Version + "\n" + info.String()
135+
app.Version = strings.TrimSpace(strings.ReplaceAll(info.String(), "\n", "\n "))
136136

137137
app.Flags, app.Metadata, err = criocli.GetFlagsAndMetadata()
138138
if err != nil {

0 commit comments

Comments
 (0)