diff options
author | gjoranv <gv@oath.com> | 2018-11-05 14:24:23 +0100 |
---|---|---|
committer | gjoranv <gv@oath.com> | 2018-11-05 14:24:23 +0100 |
commit | 0b78261d5f03661734e7d0c202f12d843e69f28d (patch) | |
tree | f18f81bf01844432f67d76f4e92370f339a22f2f /bootstrap.sh | |
parent | a3a8c8277ca44ee1bfe4bd13900d3e99d52764c1 (diff) |
Check for existence of correct variable.
+ Use bash double brackets
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-x | bootstrap.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bootstrap.sh b/bootstrap.sh index 2353154da8d..c8f300408db 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -29,9 +29,9 @@ get_env_var_with_optional_default() { local var_name=$1 local default_val=$2 eval "existing_value=\${$var_name}" - if [ -n "$existing_value" ]; then + if [[ -n $existing_value ]]; then echo "$existing_value" - elif [ $# -ge 2 ]; then + elif [[ -n $default_val ]]; then echo "$default_val" fi } |