Browse code

Fix unbound literal in trueorfalse()

Change-Id: I4c465819c311604e97d24e081389ff531f8a42fa

Dean Troyer authored on 2015/01/31 04:54:40
Showing 1 changed files
... ...
@@ -245,7 +245,7 @@ function trueorfalse {
245 245
     set +o xtrace
246 246
     local default=$1
247 247
     local literal=$2
248
-    local testval=${!literal}
248
+    local testval=${!literal:-}
249 249
 
250 250
     [[ -z "$testval" ]] && { echo "$default"; return; }
251 251
     [[ "0 no No NO false False FALSE" =~ "$testval" ]] && { echo "False"; return; }