From: Thanh Ha Date: Sat, 27 May 2017 15:22:11 +0000 (-0400) Subject: Fix unbound variable failure X-Git-Tag: v0.3.0~19 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;ds=inline;h=2c2b7ab2906106cf553e0ab358229496a5f1558e;p=releng%2Fglobal-jjb.git Fix unbound variable failure Virtualenv's activate script has expected unbound variables so will cause the install scripts to fail if we `set -u` so let's not set that and leave a note. Change-Id: I65179570e20e5ae39da54f944ad3a7331ce86184 Signed-off-by: Thanh Ha --- diff --git a/shell/jjb-install.sh b/shell/jjb-install.sh index 6eea3adf..af2f42c5 100644 --- a/shell/jjb-install.sh +++ b/shell/jjb-install.sh @@ -11,7 +11,8 @@ echo "---> jjb-install.sh" # Ensure we fail the job if any steps fail. -set -eu -o pipefail +# DO NOT set -u as virtualenv's activate script has unbound variables +set -e -o pipefail virtualenv "$WORKSPACE/.virtualenvs/jjb" # shellcheck source=./.virtualenvs/jjb/bin/activate disable=SC1091 diff --git a/shell/lftools-install.sh b/shell/lftools-install.sh index 06fbe03b..7ae9618d 100644 --- a/shell/lftools-install.sh +++ b/shell/lftools-install.sh @@ -11,7 +11,8 @@ echo "---> lftools-install.sh" # Ensure we fail the job if any steps fail. -set -eu -o pipefail +# DO NOT set -u as virtualenv's activate script has unbound variables +set -e -o pipefail virtualenv "$WORKSPACE/.virtualenvs/lftools" # shellcheck source=./.virtualenvs/lftools/bin/activate disable=SC1091