Files
dokku/plugins/plugin/subcommands/trigger
Jose Diaz-Gonzalez 0cf03baa78 feat: add ability to trigger an arbitrary plugin hook
This is useful in cases where the command output must be tested, but it is otherwise embedded in a specific part of the dokku core.
As the 'plugin' commands require root, this is safe to add to the core.
2019-05-13 16:17:55 -04:00

14 lines
252 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
plugin_trigger_cmd() {
declare desc="trigger an arbitrary plugin hook"
local cmd="plugin:trigger"
[[ "$1" == "$cmd" ]] && shift 1
plugn trigger "$@"
}
plugin_trigger_cmd "$@"