mirror of
https://github.com/dokku/dokku.git
synced 2026-02-23 19:50:34 +01:00
refactor: unify command declaration across codebase
This commit is contained in:
@@ -235,8 +235,8 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
cmd-hello-default() {
|
||||
declare desc="prints Hello \$APP"
|
||||
declare cmd="hello" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
declare cmd="hello"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
# Support --app/$DOKKU_APP_NAME flag
|
||||
# Use the following lines to reorder args into "$cmd $DOKKU_APP_NAME $@""
|
||||
[[ -n $DOKKU_APP_NAME ]] && set -- $DOKKU_APP_NAME $@
|
||||
@@ -263,8 +263,8 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
cmd-hello-world() {
|
||||
declare desc="prints Hello world"
|
||||
declare cmd="hello:world" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
declare cmd="hello:world"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
|
||||
echo "Hello world"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user