Skip to content

Commit

Permalink
fix build script missing complain if no command is given
Browse files Browse the repository at this point in the history
advance no command check,
avoid `shift` error and exit immediately
(caused by bash `-e` option)
  • Loading branch information
oldratlee authored and mattirn committed Oct 8, 2021
1 parent a3e9782 commit e279549
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ function mvn {
./mvnw $*
}

command="$1"; shift

command="$1"
# complain if no command is given
if [ -z "$command" ]; then
usage
fi

shift

case "$command" in
# change the version of the project
change-version)
Expand Down

0 comments on commit e279549

Please sign in to comment.