Merge pull request #8109 from dokku/7308-skip-install-trigger

Allow skipping the install trigger when installing a plugin
This commit is contained in:
Jose Diaz-Gonzalez
2025-11-18 15:06:25 -05:00
committed by GitHub
6 changed files with 18 additions and 6 deletions

View File

@@ -33,6 +33,7 @@ download_and_enable_plugin() {
declare desc="wrapper to download and enable specified version of plugin"
local PLUGIN_GIT_URL="$1"
shift
local SKIP_INSTALL_TRIGGER=false
while getopts ":-:" opt "$@"; do
case "$opt" in
-)
@@ -47,6 +48,9 @@ download_and_enable_plugin() {
OPTIND=$((OPTIND + 1))
local CUSTOM_NAME="$val"
;;
skip-install-trigger)
SKIP_INSTALL_TRIGGER=true
;;
esac
;;
esac
@@ -58,6 +62,9 @@ download_and_enable_plugin() {
if [[ -n "$PLUGIN_COMMITTISH" ]]; then
update_plugin "$PLUGIN_NAME" "$PLUGIN_COMMITTISH"
fi
if [[ "$SKIP_INSTALL_TRIGGER" == "false" ]]; then
plugn trigger install
fi
}
update_plugin() {

View File

@@ -29,7 +29,7 @@ fn-help-content() {
cat <<help_content
plugin:disable <name>, Disable an installed plugin (third-party only)
plugin:enable <name>, Enable a previously disabled plugin
plugin:install [--core|--git-url] [--committish branch|commit|commit] [--name custom-plugin-name], Optionally download git-url (and pin to the specified branch/commit/tag) & run install trigger for active plugins (or only core ones)
plugin:install [--core|--git-url] [--committish branch|commit|commit] [--name custom-plugin-name] [--skip-install-trigger], Optionally download git-url (and pin to the specified branch/commit/tag) & run install trigger for active plugins (or only core ones)
plugin:install-dependencies [--core], Run install-dependencies trigger for active plugins (or only core ones)
plugin:list, Print active plugins
plugin:trigger <args...>, Trigger an arbitrary plugin hook

View File

@@ -18,7 +18,6 @@ cmd-plugin-install() {
;;
https:* | git* | ssh:* | file:* | *.tar.gz | *.tgz)
download_and_enable_plugin "$@"
plugn trigger install
;;
*)
if [[ -n "$FLAG" ]]; then