Fix unbound literal in trueorfalse()

Change-Id: I4c465819c311604e97d24e081389ff531f8a42fa
This commit is contained in:
Dean Troyer 2015-01-30 13:54:40 -06:00
parent b9a7d3b5e4
commit a1b82cc1b5

View File

@ -245,7 +245,7 @@ function trueorfalse {
set +o xtrace
local default=$1
local literal=$2
local testval=${!literal}
local testval=${!literal:-}
[[ -z "$testval" ]] && { echo "$default"; return; }
[[ "0 no No NO false False FALSE" =~ "$testval" ]] && { echo "False"; return; }