mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-3364 Fix panic when load config failes (#3361)
This commit is contained in:
committed by
Christopher Speller
parent
8c8344fc41
commit
1ac3bfa603
@@ -2251,10 +2251,6 @@
|
||||
"id": "mattermost.system_admins.error",
|
||||
"translation": "Fehler beim Laden der Systemadministratoren für Sicherheitsupdates von Mattermost."
|
||||
},
|
||||
{
|
||||
"id": "mattermost.unable_to_load_config",
|
||||
"translation": "Laden der Mattermost Konfigurationsdatei nicht möglich:"
|
||||
},
|
||||
{
|
||||
"id": "mattermost.working_dir",
|
||||
"translation": "Aktuelles Arbeitsverzeichnis ist %v"
|
||||
|
||||
@@ -2255,10 +2255,6 @@
|
||||
"id": "mattermost.system_admins.error",
|
||||
"translation": "Failed to get system admins for security update information from Mattermost."
|
||||
},
|
||||
{
|
||||
"id": "mattermost.unable_to_load_config",
|
||||
"translation": "Unable to load mattermost configuration file:"
|
||||
},
|
||||
{
|
||||
"id": "mattermost.working_dir",
|
||||
"translation": "Current working directory is %v"
|
||||
|
||||
@@ -2251,10 +2251,6 @@
|
||||
"id": "mattermost.system_admins.error",
|
||||
"translation": "Falla al obtener los administradores de sistema que reciben información referente a las actualizaciones de seguridade de Mattermost."
|
||||
},
|
||||
{
|
||||
"id": "mattermost.unable_to_load_config",
|
||||
"translation": "No se pudo cargar el archivo de configuración de Mattermost:"
|
||||
},
|
||||
{
|
||||
"id": "mattermost.working_dir",
|
||||
"translation": "El directorio de trabajo actual es %v"
|
||||
|
||||
@@ -2251,10 +2251,6 @@
|
||||
"id": "mattermost.system_admins.error",
|
||||
"translation": "Échec du chargement de la liste des administrateurs système pour les informer d'une mise à jour de sécurité de Mattermost."
|
||||
},
|
||||
{
|
||||
"id": "mattermost.unable_to_load_config",
|
||||
"translation": "Impossible de charger le fichier de configuration mattermost :"
|
||||
},
|
||||
{
|
||||
"id": "mattermost.working_dir",
|
||||
"translation": "Le dossier de travail actuel est %v"
|
||||
|
||||
@@ -2251,10 +2251,6 @@
|
||||
"id": "mattermost.system_admins.error",
|
||||
"translation": "Mattermostからのセキュリティーアップデート情報に関してシステム管理者を取得できません"
|
||||
},
|
||||
{
|
||||
"id": "mattermost.unable_to_load_config",
|
||||
"translation": "Mattermostの設定ファイルを読み込めません:"
|
||||
},
|
||||
{
|
||||
"id": "mattermost.working_dir",
|
||||
"translation": "現在のワーキングディレクトリーは%vです"
|
||||
|
||||
@@ -2251,10 +2251,6 @@
|
||||
"id": "mattermost.system_admins.error",
|
||||
"translation": "Falha ao obter administradores do sistema para a informação de atualização de segurança do Mattermost."
|
||||
},
|
||||
{
|
||||
"id": "mattermost.unable_to_load_config",
|
||||
"translation": "Não foi possível carregar o arquivo de configuração do mattermost:"
|
||||
},
|
||||
{
|
||||
"id": "mattermost.working_dir",
|
||||
"translation": "Diretório atual é %v"
|
||||
|
||||
@@ -71,7 +71,7 @@ var flagRunCmds bool
|
||||
func doLoadConfig(filename string) (err string) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
err = r.(string)
|
||||
err = fmt.Sprintf("Error loding config, err=%v", r)
|
||||
}
|
||||
}()
|
||||
utils.LoadConfig(filename)
|
||||
@@ -83,7 +83,7 @@ func main() {
|
||||
parseCmds()
|
||||
|
||||
if errstr := doLoadConfig(flagConfigFile); errstr != "" {
|
||||
l4g.Exit(utils.T("mattermost.unable_to_load_config"), errstr)
|
||||
l4g.Exit("Unable to load mattermost configuration file:", errstr)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ func main() {
|
||||
utils.ConfigureCmdLineLog()
|
||||
}
|
||||
utils.InitTranslations(utils.Cfg.LocalizationSettings)
|
||||
utils.TestConnection(utils.Cfg)
|
||||
|
||||
pwd, _ := os.Getwd()
|
||||
l4g.Info(utils.T("mattermost.current_version"), model.CurrentVersion, model.BuildNumber, model.BuildDate, model.BuildHash, model.BuildHashEnterprise)
|
||||
|
||||
@@ -178,7 +178,6 @@ func LoadConfig(fileName string) {
|
||||
}
|
||||
|
||||
configureLog(&config.LogSettings)
|
||||
TestConnection(&config)
|
||||
|
||||
if config.FileSettings.DriverName == model.IMAGE_DRIVER_LOCAL {
|
||||
dir := config.FileSettings.Directory
|
||||
|
||||
Reference in New Issue
Block a user