From 3b0bf4d8f2add786b300df5f55895dc31d1db1eb Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 28 Jan 2022 20:18:36 -0500 Subject: [PATCH] feat: use --all flag for clearing proxy config during ps:restore Without this, we might end up with one or more apps that still have a proxy config. --- plugins/ps/functions.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/plugins/ps/functions.go b/plugins/ps/functions.go index e62bffbed..ea9aed9b5 100644 --- a/plugins/ps/functions.go +++ b/plugins/ps/functions.go @@ -218,16 +218,8 @@ func removeProcfile(appName string) error { } func restorePrep() error { - apps, err := common.DokkuApps() - if err != nil { - common.LogWarn(err.Error()) - return nil - } - - for _, appName := range apps { - if err := common.PlugnTrigger("proxy-clear-config", []string{appName}...); err != nil { - return fmt.Errorf("Error clearing proxy config: %s", err) - } + if err := common.PlugnTrigger("proxy-clear-config", []string{"--all"}...); err != nil { + return fmt.Errorf("Error clearing proxy config: %s", err) } return nil