diff --git a/commands b/commands index 73b93a6..bbc98e9 100755 --- a/commands +++ b/commands @@ -3,10 +3,6 @@ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/config" [[ " help $PLUGIN_COMMAND_PREFIX:help " == *" $1 "* ]] || [[ "$1" == "$PLUGIN_COMMAND_PREFIX:"* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT" set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -PLUGIN_BASE_PATH="$PLUGIN_PATH" -if [[ -n $DOKKU_API_VERSION ]]; then - PLUGIN_BASE_PATH="$PLUGIN_ENABLED_PATH" -fi source "$PLUGIN_BASE_PATH/common/functions" source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/functions" diff --git a/config b/config index 38c4166..56d17ed 100644 --- a/config +++ b/config @@ -12,3 +12,7 @@ export PLUGIN_IMAGE=$POSTGRES_IMAGE export PLUGIN_IMAGE_VERSION=$POSTGRES_IMAGE_VERSION export PLUGIN_SCHEME="postgres" export PLUGIN_SERVICE="Postgres" +export PLUGIN_BASE_PATH="$PLUGIN_PATH" +if [[ -n $DOKKU_API_VERSION ]]; then + export PLUGIN_BASE_PATH="$PLUGIN_ENABLED_PATH" +fi