From: Jeremy Phelps Date: Mon, 14 May 2018 22:09:55 +0000 (-0500) Subject: Prevent unbound variable error on create-netrc.sh X-Git-Tag: v0.20.0~8 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F32%2F10632%2F2;p=releng%2Fglobal-jjb.git Prevent unbound variable error on create-netrc.sh Change-Id: I15498ccf8a16fb93d307408f515751ea98c0003b Signed-off-by: Jeremy Phelps --- diff --git a/shell/create-netrc.sh b/shell/create-netrc.sh index b309c54b..81ac647e 100644 --- a/shell/create-netrc.sh +++ b/shell/create-netrc.sh @@ -13,9 +13,9 @@ echo "---> create-netrc.sh" # Ensure we fail the job if any steps fail. set -eu -o pipefail -ALT_NEXUS_URL="${ALT_NEXUS_URL}" +ALT_NEXUS_URL="${ALT_NEXUS_URL:-None}" -if [ -z "$ALT_NEXUS_URL" ] +if [[ -z "$ALT_NEXUS_URL" || "$ALT_NEXUS_URL" == "None" ]] then NEXUS_URL="${NEXUSPROXY:-$NEXUS_URL}" else