fix: properly detect empty subcommands

Closes #2849
This commit is contained in:
Jose Diaz-Gonzalez
2017-08-19 18:55:56 -04:00
parent 15494d85a9
commit 6aa315f815
2 changed files with 7 additions and 1 deletions

2
dokku
View File

@@ -125,7 +125,7 @@ execute_dokku_cmd() {
elif [[ -x $PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/$PLUGIN_CMD ]]; then
"$PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/$PLUGIN_CMD" "$@"
implemented=1
elif [[ -x $PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:} ]]; then
elif [[ -x $PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:} ]] && [[ "${1#*:}" !== ":" ]]; then
"$PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:}" "$@"
implemented=1
fi