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
@@ -44,12 +44,16 @@ func runServerCmd(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
func runServer(configFileLocation string) {
|
||||
if errstr := utils.InitAndLoadConfig(configFileLocation); errstr != "" {
|
||||
l4g.Exit("Unable to load mattermost configuration file: ", errstr)
|
||||
if err := utils.InitAndLoadConfig(configFileLocation); err != nil {
|
||||
l4g.Exit("Unable to load Mattermost configuration file: ", err)
|
||||
return
|
||||
}
|
||||
|
||||
if err := utils.InitTranslations(utils.Cfg.LocalizationSettings); err != nil {
|
||||
l4g.Exit("Unable to load Mattermost translation files: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
utils.InitTranslations(utils.Cfg.LocalizationSettings)
|
||||
utils.TestConnection(utils.Cfg)
|
||||
|
||||
pwd, _ := os.Getwd()
|
||||
|
||||
Ссылка в новой задаче
Block a user