enrich versioning with build deps (#7848)

`version --long` output now shows the list of build dependencies.

Redirect version's output to `stdout`.
This commit is contained in:
Alessio Treglia
2020-11-09 15:17:36 +00:00
committed by GitHub
parent 70fa17b55a
commit e172a08333
4 changed files with 40 additions and 16 deletions
+1
View File
@@ -17,6 +17,7 @@ func NewVersionCommand() *cobra.Command {
Short: "Print the application binary version information",
RunE: func(cmd *cobra.Command, _ []string) error {
verInfo := NewInfo()
cmd.SetOut(cmd.OutOrStdout())
if long, _ := cmd.Flags().GetBool(flagLong); !long {
cmd.Println(verInfo.Version)