fix: do not delete app when the app name is invalid
Let folks call apps:destroy instead. Refs #4129
This commit is contained in:
@@ -406,11 +406,6 @@ func IsValidAppName(appName string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
appRoot := AppRoot(appName)
|
||||
if DirectoryExists(appRoot) {
|
||||
os.RemoveAll(appRoot)
|
||||
}
|
||||
|
||||
return errors.New("App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, colons, or underscores")
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,6 @@ is_valid_app_name() {
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ -d "$DOKKU_ROOT/$APP" ]] && rm -rf "${DOKKU_ROOT:?}/$APP"
|
||||
dokku_log_fail "App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, colons, or underscores"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user