mirror of
https://github.com/project-zot/zot.git
synced 2025-02-17 23:45:36 -05:00
Fix cli version showing help message, closes #361
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
parent
4896adad1b
commit
e6d6d5a7de
1 changed files with 6 additions and 4 deletions
|
@ -170,9 +170,10 @@ func NewServerRootCmd() *cobra.Command {
|
|||
if showVersion {
|
||||
log.Info().Str("distribution-spec", distspec.Version).Str("commit", config.Commit).
|
||||
Str("binary-type", config.BinaryType).Str("go version", config.GoVersion).Msg("version")
|
||||
}
|
||||
} else {
|
||||
_ = cmd.Usage()
|
||||
cmd.SilenceErrors = false
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -200,9 +201,10 @@ func NewCliRootCmd() *cobra.Command {
|
|||
if showVersion {
|
||||
log.Info().Str("distribution-spec", distspec.Version).Str("commit", config.Commit).
|
||||
Str("binary-type", config.BinaryType).Str("go version", config.GoVersion).Msg("version")
|
||||
}
|
||||
} else {
|
||||
_ = cmd.Usage()
|
||||
cmd.SilenceErrors = false
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue