From e041442ffd284c452f59005ec353e67dcb96292b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 7 Feb 2023 15:21:57 -0500 Subject: [PATCH] fix: actually call the :set function and ensure we write properties to the correct namespace --- subcommands/set | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/subcommands/set b/subcommands/set index 823497b..8c82b1e 100755 --- a/subcommands/set +++ b/subcommands/set @@ -4,6 +4,7 @@ set -eo pipefail [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_BASE_PATH/common/functions" source "$PLUGIN_BASE_PATH/common/property-functions" +source "$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)/common-functions" service-set-cmd() { #E set the network to attach after the service container is started @@ -28,13 +29,15 @@ service-set-cmd() { if [[ -n "$VALUE" ]]; then dokku_log_info2_quiet "Setting ${KEY} to ${VALUE}" - fn-plugin-property-write "PLUGIN_COMMAND_PREFIX" "$SERVICE" "$KEY" "$VALUE" + fn-plugin-property-write "$PLUGIN_COMMAND_PREFIX" "$SERVICE" "$KEY" "$VALUE" else dokku_log_info2_quiet "Unsetting ${KEY}" if [[ "$KEY" == "rev-env-var" ]]; then - fn-plugin-property-write "PLUGIN_COMMAND_PREFIX" "$SERVICE" "$KEY" "$VALUE" + fn-plugin-property-write "$PLUGIN_COMMAND_PREFIX" "$SERVICE" "$KEY" "$VALUE" else - fn-plugin-property-delete "PLUGIN_COMMAND_PREFIX" "$SERVICE" "$KEY" + fn-plugin-property-delete "$PLUGIN_COMMAND_PREFIX" "$SERVICE" "$KEY" fi fi } + +service-set-cmd "$@"