diff --git a/plugins/nginx-vhosts/functions b/plugins/nginx-vhosts/functions index 49270ae9e55..5d8d61510d7 100755 --- a/plugins/nginx-vhosts/functions +++ b/plugins/nginx-vhosts/functions @@ -145,7 +145,7 @@ nginx_build_config() { if [[ -z "$DOKKU_APP_LISTEN_PORT" ]] && [[ -z "$DOKKU_APP_LISTEN_IP" ]]; then shopt -s nullglob for DOKKU_APP_IP_FILE in $DOKKU_ROOT/$APP/IP.web.*; do - DOKKU_APP_PORT_FILE=$(echo $DOKKU_APP_IP_FILE | sed -e "s:IP:PORT:g") + DOKKU_APP_PORT_FILE="${DOKKU_APP_IP_FILE//IP/PORT}" DOKKU_APP_LISTENER_IP=$(< $DOKKU_APP_IP_FILE) DOKKU_APP_LISTENER_PORT=$(< $DOKKU_APP_PORT_FILE) diff --git a/tests.mk b/tests.mk index 67a50562481..03858db02e8 100644 --- a/tests.mk +++ b/tests.mk @@ -61,10 +61,9 @@ lint: # these are disabled due to their expansive existence in the codebase. we should clean it up though # SC2034: VAR appears unused - https://github.com/koalaman/shellcheck/wiki/SC2034 # SC2086: Double quote to prevent globbing and word splitting - https://github.com/koalaman/shellcheck/wiki/SC2086 - # SC2001: See if you can use ${variable//search/replace} instead. - https://github.com/koalaman/shellcheck/wiki/SC2001 @echo linting... @$(QUIET) shellcheck ./contrib/dokku_client.sh - @$(QUIET) find . -not -path '*/\.*' | xargs file | egrep "shell|bash" | egrep -v "directory|toml" | awk '{ print $$1 }' | sed 's/://g' | grep -v dokku_client.sh | xargs shellcheck -e SC2034,SC2086,SC2001 + @$(QUIET) find . -not -path '*/\.*' | xargs file | egrep "shell|bash" | egrep -v "directory|toml" | awk '{ print $$1 }' | sed 's/://g' | grep -v dokku_client.sh | xargs shellcheck -e SC2034,SC2086 unit-tests: @echo running unit tests...