From aff0c1fc40913397e4a88e1f864b918958e0d83d Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 29 May 2020 14:42:30 -0400 Subject: [PATCH] fix: check if the property exists before returning an error --- plugins/common/properties.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/common/properties.go b/plugins/common/properties.go index 5c5971fab..437ac12ce 100644 --- a/plugins/common/properties.go +++ b/plugins/common/properties.go @@ -64,6 +64,10 @@ func PropertyClone(pluginName string, oldAppName string, newAppName string) erro func PropertyDelete(pluginName string, appName string, property string) error { propertyPath := getPropertyPath(pluginName, appName, property) if err := os.Remove(propertyPath); err != nil { + if !PropertyExists(pluginName, appName, property) { + return nil + } + return fmt.Errorf("Unable to remove %s property %s.%s", pluginName, appName, property) }