diff --git a/plugins/storage/functions b/plugins/storage/functions index 1183fc57c..d7fd8f4cf 100755 --- a/plugins/storage/functions +++ b/plugins/storage/functions @@ -3,16 +3,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions" -storage_list_cmd() { - declare desc="List all bound mounts" - local cmd="storage:list" - local passed_phases="deploy" - [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" - verify_app_name "$2" && local APP="$2" - echo "$APP volume bind-mounts:" - get_bind_mounts "$(get_phase_file_path "$passed_phases")" -} - verify_paths() { declare desc="verifies storage paths" echo "$1" | grep -qe '^/.*\:/' || dokku_log_fail "Storage path must be two valid paths divided by colon." diff --git a/plugins/storage/internal-functions b/plugins/storage/internal-functions index 913af714b..745c6a8ed 100755 --- a/plugins/storage/internal-functions +++ b/plugins/storage/internal-functions @@ -1,5 +1,8 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions" +source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions" storage_help_content_func() { declare desc="return storage plugin help content" @@ -26,3 +29,13 @@ storage_help_cmd() { help_desc fi } + +storage_list_cmd() { + declare desc="List all bound mounts" + local cmd="storage:list" + local passed_phases="deploy" + [[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on" + verify_app_name "$2" && local APP="$2" + echo "$APP volume bind-mounts:" + get_bind_mounts "$(get_phase_file_path "$passed_phases")" +} diff --git a/plugins/storage/subcommands/list b/plugins/storage/subcommands/list index ca27076b3..6dff5c6cf 100755 --- a/plugins/storage/subcommands/list +++ b/plugins/storage/subcommands/list @@ -1,6 +1,5 @@ #!/usr/bin/env bash set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x -source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions" - +source "$PLUGIN_AVAILABLE_PATH/storage/internal-functions" storage_list_cmd "$@"