From 02af8398c48f258e04cf423d860ab864267244b7 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 10 Apr 2018 14:09:43 -0400 Subject: [PATCH] Update pre-delete --- plugins/apps/pre-delete | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/apps/pre-delete b/plugins/apps/pre-delete index 18778ea20..f3cf812d6 100755 --- a/plugins/apps/pre-delete +++ b/plugins/apps/pre-delete @@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" apps_pre_delete() { declare desc="apps pre-delete plugin trigger" local trigger="apps_pre_delete" - local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG"); local CACHE_DIR="$DOKKU_ROOT/$APP/cache"; local CACHE_HOST_ROOT="$DOKKU_HOST_ROOT/$APP/cache" + local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG"); local CACHE_DIR="$DOKKU_ROOT/$APP/cache"; local CACHE_HOST_DIR="$DOKKU_HOST_ROOT/$APP/cache" verify_app_name "$APP" if ! is_image_herokuish_based "$IMAGE"; then @@ -13,7 +13,7 @@ apps_pre_delete() { fi if [[ -d $CACHE_DIR ]]; then - docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$CACHE_HOST_ROOT:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true + docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$CACHE_HOST_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true fi }