diff --git a/commands b/commands index 7b04ab7..1a90dd9 100755 --- a/commands +++ b/commands @@ -10,10 +10,6 @@ if [[ ! -d $PLUGIN_DATA_ROOT ]]; then dokku_log_fail "$PLUGIN_SERVICE: Please run: sudo dokku plugin:install" fi -if [[ -d "$PLUGIN_DATA_ROOT/*" ]]; then - rm -rf "${PLUGIN_DATA_ROOT:?}/*" -fi - case "$1" in $PLUGIN_COMMAND_PREFIX:clone) "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/subcommands/clone" "$@" diff --git a/config b/config index d31d55c..ffbe070 100755 --- a/config +++ b/config @@ -16,3 +16,7 @@ export PLUGIN_BASE_PATH="$PLUGIN_PATH" if [[ -n $DOKKU_API_VERSION ]]; then export PLUGIN_BASE_PATH="$PLUGIN_ENABLED_PATH" fi + +if [[ -d "$PLUGIN_DATA_ROOT/*" ]]; then + rm -rf "${PLUGIN_DATA_ROOT:?}/*" +fi