Merge pull request #6713 from zmstone/fix-bin-emqx-print-usage-when-no-command

fix(bin/emqx): print usage when no command given
This commit is contained in:
Zaiming (Stone) Shi 2022-01-12 10:50:37 +01:00 committed by GitHub
commit 7556a68257
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -199,6 +199,11 @@ usage() {
COMMAND="${1:-}"
if [ -z "$COMMAND" ]; then
usage 'nil'
exit 1
fi
if [ "${2:-}" = 'help' ]; then
## 'ctl' command has its own usage info
if [ "$COMMAND" != 'ctl' ]; then