mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08:00
Fix cli version showing help message, closes #361
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
4896adad1b
commit
e6d6d5a7de
+6
-4
@@ -170,9 +170,10 @@ func NewServerRootCmd() *cobra.Command {
|
|||||||
if showVersion {
|
if showVersion {
|
||||||
log.Info().Str("distribution-spec", distspec.Version).Str("commit", config.Commit).
|
log.Info().Str("distribution-spec", distspec.Version).Str("commit", config.Commit).
|
||||||
Str("binary-type", config.BinaryType).Str("go version", config.GoVersion).Msg("version")
|
Str("binary-type", config.BinaryType).Str("go version", config.GoVersion).Msg("version")
|
||||||
|
} else {
|
||||||
|
_ = cmd.Usage()
|
||||||
|
cmd.SilenceErrors = false
|
||||||
}
|
}
|
||||||
_ = cmd.Usage()
|
|
||||||
cmd.SilenceErrors = false
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,9 +201,10 @@ func NewCliRootCmd() *cobra.Command {
|
|||||||
if showVersion {
|
if showVersion {
|
||||||
log.Info().Str("distribution-spec", distspec.Version).Str("commit", config.Commit).
|
log.Info().Str("distribution-spec", distspec.Version).Str("commit", config.Commit).
|
||||||
Str("binary-type", config.BinaryType).Str("go version", config.GoVersion).Msg("version")
|
Str("binary-type", config.BinaryType).Str("go version", config.GoVersion).Msg("version")
|
||||||
|
} else {
|
||||||
|
_ = cmd.Usage()
|
||||||
|
cmd.SilenceErrors = false
|
||||||
}
|
}
|
||||||
_ = cmd.Usage()
|
|
||||||
cmd.SilenceErrors = false
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user