Skip to content

Commit

Permalink
Changes based on Codacy code scanning warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ashitsalesforce committed Jan 10, 2024
1 parent c2a8145 commit a77034c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dlbuilder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ run_mvn() {
# run a mvn build to download dependencies from the central maven repo
mvn clean compile
# remove vulnerable class from log4j jar file
log4j_version_num=`awk '/<artifactId>log4j-core/{getline; print}' pom.xml | awk '{$1=$1};1' `
log4j_version_num=$(awk '/<artifactId>log4j-core/{getline; print}' pom.xml | awk '{$1=$1};1' )
log4j_version_num=${log4j_version_num#<version>};
log4j_version_num=${log4j_version_num%</version>};

Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/mac/util/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ checkJavaVersion() {
initVars

echo "Data Loader requires Java JRE ${MIN_JAVA_VERSION} or later. Checking if it is installed..."
if [ ! -z "${DATALOADER_JAVA_HOME}" ]
if [ -n "${DATALOADER_JAVA_HOME}" ]
then
JAVA_HOME=${DATALOADER_JAVA_HOME}
fi
Expand All @@ -43,11 +43,11 @@ exitWithJavaDownloadMessage() {
echo "Java JRE ${MIN_JAVA_VERSION} or later is not installed or DATALOADER_JAVA_HOME environment variable is not set."
echo "For example, download and install Zulu JRE ${MIN_JAVA_VERSION} or later from here:"
echo " https://www.azul.com/downloads/"
exit -1
exit 1
}

runDataLoader() {
checkJavaVersion
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
java -cp "${SCRIPT_DIR}/../*" com.salesforce.dataloader.process.DataLoaderRunner $@
java -cp "${SCRIPT_DIR}/../*" com.salesforce.dataloader.process.DataLoaderRunner "$@"
}

0 comments on commit a77034c

Please sign in to comment.