Merge pull request #2880 from dokku/2849-empty-subcommand
fix: properly detect empty subcommands
This commit is contained in:
2
dokku
2
dokku
@@ -125,7 +125,7 @@ execute_dokku_cmd() {
|
|||||||
elif [[ -x $PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/$PLUGIN_CMD ]]; then
|
elif [[ -x $PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/$PLUGIN_CMD ]]; then
|
||||||
"$PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/$PLUGIN_CMD" "$@"
|
"$PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/$PLUGIN_CMD" "$@"
|
||||||
implemented=1
|
implemented=1
|
||||||
elif [[ -x $PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:} ]]; then
|
elif [[ -x $PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:} ]] && [[ -n "${1#*:}" ]]; then
|
||||||
"$PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:}" "$@"
|
"$PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:}" "$@"
|
||||||
implemented=1
|
implemented=1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -50,10 +50,16 @@ build_nginx_config() {
|
|||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_failure
|
assert_failure
|
||||||
|
|
||||||
run /bin/bash -c "dokku fakecommand 2>&1 | grep -q 'is not a dokku command'"
|
run /bin/bash -c "dokku fakecommand 2>&1 | grep -q 'is not a dokku command'"
|
||||||
echo "output: "$output
|
echo "output: "$output
|
||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
|
run /bin/bash -c "dokku apps: 2>&1 | grep -q 'is not a dokku command'"
|
||||||
|
echo "output: "$output
|
||||||
|
echo "status: "$status
|
||||||
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "(core) urls (non-ssl)" {
|
@test "(core) urls (non-ssl)" {
|
||||||
|
|||||||
Reference in New Issue
Block a user