Skip to content

Commit 8942585

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Fix unbound literal in trueorfalse()"
2 parents c195b64 + a1b82cc commit 8942585

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

functions-common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ function trueorfalse {
245245
set +o xtrace
246246
local default=$1
247247
local literal=$2
248-
local testval=${!literal}
248+
local testval=${!literal:-}
249249

250250
[[ -z "$testval" ]] && { echo "$default"; return; }
251251
[[ "0 no No NO false False FALSE" =~ "$testval" ]] && { echo "False"; return; }

0 commit comments

Comments
 (0)