Skip to content

Commit

Permalink
adds rpk version to cobra's Version field
Browse files Browse the repository at this point in the history
Setting this field enables use of --version without clobbering version or doing other weird stuff.
  • Loading branch information
gene-redpanda committed May 4, 2023
1 parent db6b018 commit 9557afb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/go/rpk/pkg/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func Execute() {
return opts, cobra.ShellCompDirectiveNoSpace
})

root.Version = version.Pretty()
root.AddCommand(
acl.NewCommand(fs, p),
cloud.NewCommand(fs, osExec),
Expand Down

0 comments on commit 9557afb

Please sign in to comment.