From b843774de841f71e346bcd9e30b86fecddec3318 Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Mon, 15 Oct 2018 17:08:51 -0400 Subject: MM-11905: deactivate plugins before unregistering (#9666) Plugins that listen for config changes might incorrectly re-register their commands before being /actually/ deactivated, leaving the new commands alive thereafter. --- app/plugin_install.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/plugin_install.go b/app/plugin_install.go index 588f86f08..65e697356 100644 --- a/app/plugin_install.go +++ b/app/plugin_install.go @@ -120,9 +120,8 @@ func (a *App) removePlugin(id string) *model.AppError { a.Publish(message) } - a.UnregisterPluginCommands(id) - a.Plugins.Deactivate(id) + a.UnregisterPluginCommands(id) err = os.RemoveAll(pluginPath) if err != nil { -- cgit v1.2.3-1-g7c22