diff --git a/common-functions b/common-functions index 3e36add..aa4f026 100755 --- a/common-functions +++ b/common-functions @@ -328,6 +328,7 @@ service_linked_apps() { local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE" local LINKS_FILE="$SERVICE_ROOT/LINKS" + touch "$LINKS_FILE" [[ -z $(< "$LINKS_FILE") ]] && echo '-' && return 0 tr '\n' ' ' < "$LINKS_FILE" diff --git a/config b/config index 9d5226c..4dab935 100644 --- a/config +++ b/config @@ -4,7 +4,7 @@ export POSTGRES_IMAGE_VERSION=${POSTGRES_IMAGE_VERSION:="9.6.4"} export POSTGRES_ROOT=${POSTGRES_ROOT:="/var/lib/dokku/services/postgres"} export PLUGIN_COMMAND_PREFIX="postgres" -export PLUGIN_CONFIG_ROOT="${DOKKU_LIB_ROOT}/config/${PLUGIN_COMMAND_PREFIX}" +export PLUGIN_CONFIG_ROOT=${PLUGIN_CONFIG_ROOT:="$DOKKU_LIB_ROOT/config/$PLUGIN_COMMAND_PREFIX"} export PLUGIN_DATA_ROOT=$POSTGRES_ROOT export PLUGIN_DATASTORE_PORTS=(5432) export PLUGIN_DATASTORE_WAIT_PORT=5432 diff --git a/tests/test_helper.bash b/tests/test_helper.bash index 4bd8c7f..307a475 100644 --- a/tests/test_helper.bash +++ b/tests/test_helper.bash @@ -10,6 +10,7 @@ export PLUGIN_AVAILABLE_PATH="$PLUGIN_PATH" export PLUGIN_CORE_AVAILABLE_PATH="$PLUGIN_PATH" export POSTGRES_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/fixtures" export PLUGIN_DATA_ROOT="$POSTGRES_ROOT" +export PLUGIN_CONFIG_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/config" if [[ "$(uname)" == "Darwin" ]]; then export PLUGN_URL="https://github.com/dokku/plugn/releases/download/v0.3.0/plugn_0.3.0_darwin_x86_64.tgz" else @@ -19,6 +20,9 @@ fi mkdir -p "$PLUGIN_DATA_ROOT" rm -rf "${PLUGIN_DATA_ROOT:?}"/* +mkdir -p "$PLUGIN_CONFIG_ROOT" +rm -rf "${PLUGIN_CONFIG_ROOT:?}"/* + flunk() { { if [ "$#" -eq 0 ]; then cat - else echo "$*"