fixed a bad logic for arguments parsing

This commit is contained in:
Jérémy Lecour 2020-06-05 10:58:35 +02:00 committed by Jérémy Lecour
parent 4d46d4ffe0
commit 1fb604802b
2 changed files with 4 additions and 2 deletions

View file

@ -17,6 +17,8 @@ This project does not follow semantic versioning.
### Fixed
* fixed a bad logic for arguments parsing
### Security
## [20.06] - 2020-06-03

View file

@ -204,8 +204,8 @@ main() {
[ "$1" = "-V" ] || [ "$1" = "--version" ] && show_version && exit 0
if [ -t 0 ]; then
# We have STDIN, so we should have 2 arguments
[ "$#" -eq 2 ] || error "invalid argument(s)"
# We have STDIN, so we should at least 2 arguments
[ "$#" -ge 2 ] || error "invalid argument(s)"
# read VHOST from first argument
VHOST="$1"