PLT-6471 Properly panic when translations can't be loaded (#6414)
* PLT-6471 Properly panic when translations can't be loaded * Print usage messages when errors occur during CLI initialization * Reverted behaviour of FindDir and added second return value to it * Fixed merge conflict
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
69f3f2fdce
Коммит
5c1049054e
@@ -12,12 +12,17 @@ import (
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Display version information",
|
||||
Run: versionCmdF,
|
||||
RunE: versionCmdF,
|
||||
}
|
||||
|
||||
func versionCmdF(cmd *cobra.Command, args []string) {
|
||||
initDBCommandContextCobra(cmd)
|
||||
func versionCmdF(cmd *cobra.Command, args []string) error {
|
||||
if err := initDBCommandContextCobra(cmd); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
printVersion()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func printVersion() {
|
||||
|
||||
Ссылка в новой задаче
Block a user