fixed a bad logic for arguments parsing
This commit is contained in:
parent
4d46d4ffe0
commit
1fb604802b
|
@ -17,6 +17,8 @@ This project does not follow semantic versioning.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
* fixed a bad logic for arguments parsing
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
## [20.06] - 2020-06-03
|
## [20.06] - 2020-06-03
|
||||||
|
|
|
@ -204,8 +204,8 @@ main() {
|
||||||
[ "$1" = "-V" ] || [ "$1" = "--version" ] && show_version && exit 0
|
[ "$1" = "-V" ] || [ "$1" = "--version" ] && show_version && exit 0
|
||||||
|
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 ]; then
|
||||||
# We have STDIN, so we should have 2 arguments
|
# We have STDIN, so we should at least 2 arguments
|
||||||
[ "$#" -eq 2 ] || error "invalid argument(s)"
|
[ "$#" -ge 2 ] || error "invalid argument(s)"
|
||||||
|
|
||||||
# read VHOST from first argument
|
# read VHOST from first argument
|
||||||
VHOST="$1"
|
VHOST="$1"
|
||||||
|
|
Loading…
Reference in a new issue