From 2c2b7ab2906106cf553e0ab358229496a5f1558e Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Sat, 27 May 2017 11:22:11 -0400 Subject: [PATCH] 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 --- shell/jjb-install.sh | 3 ++- shell/lftools-install.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.16.6