Merge pull request #2951 from dokku/josegonzalez-patch-1
fix: handle case where the app directory is a symlink
This commit is contained in:
@@ -6,7 +6,12 @@ app_post_delete() {
|
||||
declare desc="apps post-delete plugin trigger"
|
||||
local trigger="app_post_delete"
|
||||
local APP="$1"; local IMAGE_REPO=$(get_app_image_repo "$APP")
|
||||
[[ -n $APP ]] && rm -rf "${DOKKU_ROOT:?}/$APP" > /dev/null
|
||||
if [[ -n $APP ]]; then
|
||||
# remove contents for apps that are symlinks to other folders
|
||||
rm -rf "${DOKKU_ROOT:?}/$APP/" > /dev/null
|
||||
# then remove the folder and/or the symlink
|
||||
rm -rf "${DOKKU_ROOT:?}/$APP" > /dev/null
|
||||
fi
|
||||
|
||||
# remove all application containers & images
|
||||
# shellcheck disable=SC2046
|
||||
|
||||
Reference in New Issue
Block a user