Move command check before DOKKU_TRACE to reduce trace output
This commit is contained in:
3
commands
3
commands
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/config"
|
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
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
PLUGIN_BASE_PATH="$PLUGIN_PATH"
|
PLUGIN_BASE_PATH="$PLUGIN_PATH"
|
||||||
@@ -9,11 +10,9 @@ fi
|
|||||||
source "$PLUGIN_BASE_PATH/common/functions"
|
source "$PLUGIN_BASE_PATH/common/functions"
|
||||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/functions"
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/functions"
|
||||||
|
|
||||||
if [[ $1 == $PLUGIN_COMMAND_PREFIX:* ]]; then
|
|
||||||
if [[ ! -d $PLUGIN_DATA_ROOT ]]; then
|
if [[ ! -d $PLUGIN_DATA_ROOT ]]; then
|
||||||
dokku_log_fail "$PLUGIN_SERVICE: Please run: sudo dokku plugin:install"
|
dokku_log_fail "$PLUGIN_SERVICE: Please run: sudo dokku plugin:install"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -d "$PLUGIN_DATA_ROOT/*" ]]; then
|
if [[ -d "$PLUGIN_DATA_ROOT/*" ]]; then
|
||||||
rm -rf "$PLUGIN_DATA_ROOT/*"
|
rm -rf "$PLUGIN_DATA_ROOT/*"
|
||||||
|
|||||||
Reference in New Issue
Block a user