Fix syntax error on the common script
@@ -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
}
