这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/apps/post-delete
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"

APP="$1"; IMAGE_REPO=$(get_app_image_repo $APP)
[[ -n $APP ]] && rm -rf "$DOKKU_ROOT/$APP" > /dev/null
[[ -n $APP ]] && rm -rf "${DOKKU_ROOT:?}/$APP" > /dev/null
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prints a nice failure message and then exits if $DOKKU_ROOT is empty or unset:

$ cat sc2115.sh
#!/usr/bin/env bash
FOO=""
echo ${FOO:?}

$ ./sc2115.sh
./sc2115.sh: line 3: FOO: parameter null or not set

$ echo $?
1


# remove all application containers & images
# shellcheck disable=SC2046
Expand Down