mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-27 13:48:49 +08:00
show help and exit if no argument is provided
Signed-off-by: Jovan Kostovski <chombium@gmail.com> bugfix for the case where the script was started without an argument. The help was printed, but the _mainflux_docker was called as well, which was causing the following error: ./mainflux-docker.sh: line 163: $1: unbound variable
This commit is contained in:
parent
23a3a5f194
commit
c691ee06f0
@ -203,6 +203,7 @@ _main() {
|
||||
# No arguments provided
|
||||
if [[ $# -eq 0 ]] ; then
|
||||
_print_help
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Avoid complex option parsing when only one program option is expected.
|
||||
|
Loading…
x
Reference in New Issue
Block a user