fix: attempt to pass shellcheck on os x

This commit is contained in:
Jose Diaz-Gonzalez
2017-03-26 04:38:35 -06:00
parent 101414dcd3
commit ed7d5623ad
7 changed files with 11 additions and 9 deletions

View File

@@ -142,7 +142,7 @@ verify_app_name() {
local APP="$1"
[[ ! -n "$APP" ]] && dokku_log_fail "(verify_app_name) APP must not be null"
if [[ ! "$APP" =~ ^[a-z].* && ! "$APP" =~ ^[0-9].* ]]; then
[[ -d "$DOKKU_ROOT/$APP" ]] && rm -rf "$DOKKU_ROOT/$APP"
[[ -d "$DOKKU_ROOT/$APP" ]] && rm -rf "${DOKKU_ROOT:?}/$APP"
dokku_log_fail "App name must begin with lowercase alphanumeric character"
fi
[[ ! -d "$DOKKU_ROOT/$APP" ]] && dokku_log_fail "App $APP does not exist"