ensure app name begins with lowercase. closes #1774

This commit is contained in:
Michael Hobbs
2015-12-22 12:02:18 -08:00
parent 32f1bc5396
commit 803ef7d9f3
3 changed files with 16 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
apps_create() {
[[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on"
[[ ! "$1" =~ ^[a-z].* && ! "$1" =~ ^[0-9].* ]] && dokku_log_fail "App name must begin with lowercase alphanumeric character"
[[ -d "$DOKKU_ROOT/$1" ]] && dokku_log_fail "Name is already taken"
local APP="$1"