From 62a361cbe01e1c05baa34c98175507578111bb7c Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 10 Mar 2020 22:21:27 -0400 Subject: [PATCH] feat: log issues with removing files --- plugins/apps/triggers.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/apps/triggers.go b/plugins/apps/triggers.go index 22ae2f0b9..9a66f167d 100644 --- a/plugins/apps/triggers.go +++ b/plugins/apps/triggers.go @@ -32,9 +32,14 @@ func TriggerPostDelete(appName string) error { imageRepo := common.GetAppImageRepo(appName) // remove contents for apps that are symlinks to other folders - os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))) + if err := os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))); err != nil { + common.LogWarn(err.Error()) + } + // then remove the folder and/or the symlink - os.RemoveAll(common.AppRoot(appName)) + if err := os.RemoveAll(common.AppRoot(appName)); err != nil { + common.LogWarn(err.Error()) + } imagesByAppLabel, err := listImagesByAppLabel(appName) if err != nil {