File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ docker run --rm --name codeql-agent-docker \
137137 -v " $PWD /codeql-agent-results:/opt/results" \
138138 -e " LANGUAGE=java" \
139139 -e " JAVA_VERSION=8" \
140- -e " COMMAND=' mvn clean install' " \
140+ -e " COMMAND=mvn clean install" \
141141 doublevkay/codeql-agent-dev
142142
143143` ` `
Original file line number Diff line number Diff line change 2828fi
2929
3030if [ ! -d " $SRC " ]; then
31- print_red " Error: ${SRC} not found. Can not continue."
31+ print_red " [ Error] : ${SRC} not found. Can not continue."
3232 exit 3
3333fi
3434
9292 THREADS=" 0"
9393fi
9494
95- # Switch to Java 8
96- if [[ $JAVA_VERSION ]]
97- then
98- if [[ $JAVA_VERSION == " 8" ]]; then
99- update-java-alternatives -s $( update-java-alternatives -l | grep 8 | cut -d " " -f1) || echo ' .'
100- elif [[ $JAVA_VERSION == " 11" ]]; then
101- update-java-alternatives -s $( update-java-alternatives -l | grep 11 | cut -d " " -f1) || echo ' .'
102- fi
103- else
104- echo " Error: JAVA_VERSION must be 8 or 11."
105- fi
95+
10696
10797DB=" $OUTPUT /codeql-db"
10898
@@ -118,6 +108,18 @@ print_green " [+] Output: $OUTPUT"
118108print_green " [+] Format: $FORMAT "
119109echo " ----------------"
120110
111+ # Switch to Java 8
112+ if [[ $JAVA_VERSION ]]
113+ then
114+ if [[ $JAVA_VERSION == " 8" ]]; then
115+ update-java-alternatives -s $( update-java-alternatives -l | grep 8 | cut -d " " -f1) || echo ' .'
116+ elif [[ $JAVA_VERSION == " 11" ]]; then
117+ update-java-alternatives -s $( update-java-alternatives -l | grep 11 | cut -d " " -f1) || echo ' .'
118+ else
119+ echo " [Warning] : JAVA_VERSION must be 8 or 11."
120+ fi
121+ fi
122+
121123# Check action
122124if [ -z $ACTION ]
123125then
@@ -135,7 +137,7 @@ create_database() {
135137 codeql database create --threads=$THREADS --language=$LANGUAGE $DB -s $SRC $OVERWRITE_FLAG
136138 fi
137139 if [[ $? -ne 0 && $? -ne 2 ]]; then # ignore unempty database
138- print_red " Error: Codeql create database failed."
140+ print_red " [ Error] : Codeql create database failed."
139141 finalize
140142 exit 6
141143 fi
You can’t perform that action at this time.
0 commit comments