From 0d41bf2d6fb6cc9f02e6937c1651d0d8d829c892 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 8 May 2016 03:10:59 -0400 Subject: [PATCH] Move command check before DOKKU_TRACE to reduce trace output --- commands | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/commands b/commands index 7ed0fcb..70019a3 100755 --- a/commands +++ b/commands @@ -1,5 +1,6 @@ #!/usr/bin/env bash 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" @@ -9,10 +10,8 @@ fi source "$PLUGIN_BASE_PATH/common/functions" source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/functions" -if [[ $1 == $PLUGIN_COMMAND_PREFIX:* ]]; then - if [[ ! -d $PLUGIN_DATA_ROOT ]]; then - dokku_log_fail "$PLUGIN_SERVICE: Please run: sudo dokku plugin:install" - fi +if [[ ! -d $PLUGIN_DATA_ROOT ]]; then + dokku_log_fail "$PLUGIN_SERVICE: Please run: sudo dokku plugin:install" fi if [[ -d "$PLUGIN_DATA_ROOT/*" ]]; then