separate params from eval

This commit is contained in:
fortuna 2019-04-08 18:19:27 -04:00
parent c244868359
commit d19a5afcb8

View file

@ -445,7 +445,8 @@ function is_valid_port() {
}
function parse_flags() {
eval set -- $(getopt --longoptions hostname:,api-port:,keys-port: -n $0 -- $0 "$@")
local params=$(getopt --longoptions hostname:,api-port:,keys-port: -n $0 -- $0 "$@")
eval set -- $params
declare -g FLAGS_HOSTNAME=""
declare -gi FLAGS_API_PORT=0
declare -gi FLAGS_KEYS_PORT=0