Files
dokku/plugins/20_events/subcommands/list
Jose Diaz-Gonzalez 86795ddacc tests: run mvdan/shfmt on test runs
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™.

The command used to reprocess everything is:

```shell
shfmt -l -bn -ci -i 2 -w .
```
2019-01-07 01:25:55 -05:00

25 lines
585 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
events_list_cmd() {
declare desc="lists enabled events"
local cmd="events:list"
local PLUGIN_DIR="$(dirname "$0")/.."
local logged hook
if [[ "$DOKKU_EVENTS" ]]; then
logged="$(find "$PLUGIN_DIR" -type l -printf '%f\n' 2>/dev/null | sort -n)"
dokku_col_log_info2_quiet "Events currently logged"
for hook in $logged; do
dokku_col_log_msg "$hook"
done
else
dokku_log_warn "Events logger disabled"
fi
}
events_list_cmd "$@"