Disable unbound variable checking for activate 36/8636/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 1 Feb 2018 18:15:04 +0000 (13:15 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 1 Feb 2018 18:15:07 +0000 (13:15 -0500)
virtualenv activate contains unbound variables so must be disabled
when calling `source activate`.

Change-Id: I8af6b55962580778fbb349c8164f661c4c462928
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
shell/common-variables.sh

index 7bbc36f..6a5d2fb 100644 (file)
@@ -24,6 +24,8 @@ echo "$MAVEN_OPTIONS"
 # Activates the lftools virtualenv
 lftools_activate() {
     virtualenv --quiet "/tmp/v/lftools"
+    set +u  # Ignore unbound variables in activate
     # shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
     source "/tmp/v/lftools/bin/activate"
+    set -u  # Restore unbound variable checking
 }