fix: declare properties before they are used

This commit is contained in:
Jose Diaz-Gonzalez
2018-03-03 17:59:58 -05:00
parent 4891599d13
commit be79060d7e
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
[[ ! "$DOKKU_EVENTS" ]] || dokku_log_plugn_trigger_call "$(basename "$0")" "$@"

View File

@@ -6,12 +6,12 @@ events_list_cmd() {
declare desc="lists enabled events"
local cmd="events:list"
local PLUGIN_DIR="$(dirname "$0")/.."
local logged hook
if [[ "$DOKKU_EVENTS" ]]; then
local logged="$(find "$PLUGIN_DIR" -type l -printf '%f\n' 2>/dev/null | sort -n)"
logged="$(find "$PLUGIN_DIR" -type l -printf '%f\n' 2>/dev/null | sort -n)"
dokku_col_log_info2_quiet "Events currently logged"
local hook
for hook in $logged; do
dokku_col_log_msg "$hook"
done