From 2628022275ef64fde95545abe4634b4bd7177844 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 15 Sep 2017 08:51:46 -0400 Subject: PLT-7622 Improvements to server handling of webapp plugins (#7445) * Improvements to server handling of webapp plugins * Fix newline * Update manifest function names --- cmd/platform/server.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'cmd') diff --git a/cmd/platform/server.go b/cmd/platform/server.go index 15c80134c..a8e724f58 100644 --- a/cmd/platform/server.go +++ b/cmd/platform/server.go @@ -62,11 +62,6 @@ func runServer(configFileLocation string) { l4g.Info(utils.T("mattermost.working_dir"), pwd) l4g.Info(utils.T("mattermost.config_file"), utils.FindConfigFile(configFileLocation)) - // Enable developer settings if this is a "dev" build - if model.BuildNumber == "dev" { - *utils.Cfg.ServiceSettings.EnableDeveloper = true - } - if err := utils.TestFileConnection(); err != nil { l4g.Error("Problem with file storage settings: " + err.Error()) } @@ -79,7 +74,12 @@ func runServer(configFileLocation string) { if model.BuildEnterpriseReady == "true" { a.LoadLicense() } - a.InitPlugins("plugins", "webapp/dist") + + if webappDir, ok := utils.FindDir(model.CLIENT_DIR); ok { + a.InitPlugins("plugins", webappDir+"/plugins") + } else { + l4g.Error("Unable to find webapp directory, could not initialize plugins") + } wsapi.InitRouter() api4.InitApi(a.Srv.Router, false) @@ -98,6 +98,11 @@ func runServer(configFileLocation string) { app.ReloadConfig() + // Enable developer settings if this is a "dev" build + if model.BuildNumber == "dev" { + *utils.Cfg.ServiceSettings.EnableDeveloper = true + } + resetStatuses(a) a.StartServer() -- cgit v1.2.3-1-g7c22