diff --git a/deploy/common.sh b/deploy/common.sh index da0475341..acbe51cc9 100644 --- a/deploy/common.sh +++ b/deploy/common.sh @@ -8,12 +8,12 @@ readonly KUBECTL="${GCE_PD_KUBECTL:-kubectl}" # Common functions function ensure_var(){ - if [[ -v "${1}" ]]; + if [[ -z "${!1}" ]]; then - echo "${1} is ${!1}" - else echo "${1} is unset" exit 1 + else + echo "${1} is ${!1}" fi }