summaryrefslogtreecommitdiffstats
path: root/cmd/platform/server.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-05-23 11:06:25 -0400
committerGitHub <noreply@github.com>2017-05-23 11:06:25 -0400
commit5c1049054eace710abd3418bbad141fbb7dd5d7f (patch)
tree24d75c14ce2aae2c6f1a8d5bc7392e958e416666 /cmd/platform/server.go
parent69f3f2fdce4ae21a037ca61d753279efcc70f0ec (diff)
downloadchat-5c1049054eace710abd3418bbad141fbb7dd5d7f.tar.gz
chat-5c1049054eace710abd3418bbad141fbb7dd5d7f.tar.bz2
chat-5c1049054eace710abd3418bbad141fbb7dd5d7f.zip
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
Diffstat (limited to 'cmd/platform/server.go')
-rw-r--r--cmd/platform/server.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd/platform/server.go b/cmd/platform/server.go
index 9846f8de9..ba7ace062 100644
--- a/cmd/platform/server.go
+++ b/cmd/platform/server.go
@@ -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()