X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jenkins-init-scripts%2Flf-env.sh;h=a6907f399c842d1991d4e752dfa413a5de475018;hb=fdcb4193a50803ac02b162e4b875f126b1fe8a37;hp=68e6cf0346dbef00e0a2fe05f31a50642f9a06dc;hpb=ce0f9ab45995399edff44ae582f6ced0fa65c5d4;p=releng%2Fglobal-jjb.git diff --git a/jenkins-init-scripts/lf-env.sh b/jenkins-init-scripts/lf-env.sh index 68e6cf03..a6907f39 100644 --- a/jenkins-init-scripts/lf-env.sh +++ b/jenkins-init-scripts/lf-env.sh @@ -66,15 +66,15 @@ function lf-activate() # Functions that assign Variables ################################################################################ -# Although these variables are 'shell' variables, they need to be upper-case so -# 'shellcheck' does check for 'used-before-set' when they are referenced. So if -# forget to 'source' this file, you will get a 'run-time' error (if you have -u -# set), otherwise you will get "MAVEN_OPIONS=''. +# These variables are shell (local) variables and need to be lower-case so +# Shellcheck knows they are shell variables and will check for +# 'used-before-set'. function lf-set-maven-options() { - # shellcheck disable=SC2034 # Disable 'unused-variable' check - MAVEN_OPTIONS=$(echo --show-version --batch-mode -Djenkins \ + # Disable 'unused-variable' check + # shellcheck disable=SC2034 + maven_options="--show-version --batch-mode -Djenkins \ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ - -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r) + -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r" }