Prevent unbound variable error on create-netrc.sh 32/10632/2
authorJeremy Phelps <jphelps@linuxfoundation.org>
Mon, 14 May 2018 22:09:55 +0000 (17:09 -0500)
committerJeremy Phelps <jphelps@linuxfoundation.org>
Mon, 14 May 2018 22:18:06 +0000 (17:18 -0500)
Change-Id: I15498ccf8a16fb93d307408f515751ea98c0003b
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
shell/create-netrc.sh

index b309c54..81ac647 100644 (file)
@@ -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