added shell guard in case var is not set

This commit is contained in:
Warren Strange 2016-02-04 16:45:20 -07:00
parent 24b06d805a
commit fed1d947bc
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ function create-master-instance() {
[[ -n ${1:-} ]] && address_opt="--address ${1}"
local preemptible_master=""
if [[ "${PREEMPTIBLE_MASTER}" == "true" ]]; then
if [[ "${PREEMPTIBLE_MASTER:-}" == "true" ]]; then
preemptible_master="--preemptible --maintenance-policy TERMINATE"
fi

View File

@ -34,7 +34,7 @@ function create-master-instance {
local address_opt=""
[[ -n ${1:-} ]] && address_opt="--address ${1}"
local preemptible_master=""
if [[ "${PREEMPTIBLE_MASTER}" == "true" ]]; then
if [[ "${PREEMPTIBLE_MASTER:-}" == "true" ]]; then
preemptible_master="--preemptible --maintenance-policy TERMINATE"
fi