summaryrefslogtreecommitdiffstats
path: root/xci
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-04-06 10:53:43 +0100
committerMarkos Chandras <mchandras@suse.de>2018-04-06 10:53:43 +0100
commita2cf6b44936886ff3cc142907552b016e8f5d42e (patch)
tree6794d67a3e510b6b0e10292c534f1d2f3c23a99b /xci
parente5674e0a504304c3ac698cca39b93e8c4992b067 (diff)
xci: bifrost: Fix unbound variable error
If we are not in a virtual environment, then VIRTUAL_ENV is going to be unset and we will fail with the following error: ./scripts/bifrost-provision.sh: line 105: VIRTUAL_ENV: unbound variable As such, we need to provide a default value if that variable is unset. We also fix a typo in the _sudo variable. Change-Id: Ic018716c03ffba6e8e742e34720ea462b85341be Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci')
-rwxr-xr-xxci/infra/bifrost/scripts/bifrost-provision.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/xci/infra/bifrost/scripts/bifrost-provision.sh b/xci/infra/bifrost/scripts/bifrost-provision.sh
index 95854e90..f653a2fd 100755
--- a/xci/infra/bifrost/scripts/bifrost-provision.sh
+++ b/xci/infra/bifrost/scripts/bifrost-provision.sh
@@ -102,7 +102,7 @@ fi
# Install missing dependencies. Use sudo since for bifrost jobs
# the venv is not ready yet.
-[[ -n ${VIRTUAL_ENV} ]] && _sudo="" || sudo="sudo -H -E"
+[[ -n ${VIRTUAL_ENV:-} ]] && _sudo="" || _sudo="sudo -H -E"
${_sudo} pip install -q --upgrade -r "$(dirname $0)/../requirements.txt"
# Change working directory