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.
This commit is contained in:
13
plugins/plugin/subcommands/trigger
Executable file
13
plugins/plugin/subcommands/trigger
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/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 "$@"
|
||||
Reference in New Issue
Block a user