Add support for --app flag. Refs #1638

This change sets a DOKKU_APP_NAME env var, which can be used by plugins as a replacement for the `app` param if specified. Note that each plugin will have to manually shift it's arguments if necessary
This commit is contained in:
Jose Diaz-Gonzalez
2016-01-10 14:05:33 -05:00
committed by Michael Hobbs
parent a35e690a62
commit 76e27f0333
2 changed files with 9 additions and 1 deletions

4
dokku
View File

@@ -47,7 +47,9 @@ parse_args "$@"
args=("$@")
if [[ "${args[0]}" =~ ^--.* ]]; then
for arg in "$@"; do
if [[ "$arg" =~ ^--.* ]]; then
if [[ "$arg" == "--app" ]]; then
shift 2
elif [[ "$arg" =~ ^--.* ]]; then
shift 1
else
break