mirror of
https://github.com/spf13/cobra
synced 2025-05-05 21:07:24 +00:00
Use -gt instead of >
This commit is contained in:
parent
f1f7ec2c85
commit
eb6111705f
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ __handle_flag()
|
|||
|
||||
# keep flag value with flagname as flaghash
|
||||
# flaghash variable is an associative array which is only supported in bash > 3.
|
||||
if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" > 3 ]]; then
|
||||
if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then
|
||||
if [ -n "${flagvalue}" ] ; then
|
||||
flaghash[${flagname}]=${flagvalue}
|
||||
elif [ -n "${words[ $((c+1)) ]}" ] ; then
|
||||
|
|
Loading…
Add table
Reference in a new issue