Skip to content

Commit

Permalink
Ignore _JAVA_OPTIONS and JAVA_TOOL_OPTIONS if they're set (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x6675636b796f75676974687562 authored Mar 17, 2023
1 parent 816c94e commit f7face0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/diktat
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ JAVA_ARGS+=('-Xmx512m')
JAVA_ARGS+=("-Duser.home=$(native_path "${PWD}")")
JAVA_ARGS+=("-Ddiktat.config.path=$(native_path "${CONFIG_FILE}")")

unset _JAVA_OPTIONS JAVA_TOOL_OPTIONS
JAVA_VERSION=$("${JAVA}" -version 2>&1 | head -n1 | cut -d'"' -f2)
JAVA_MAJOR_VERSION=$(echo "${JAVA_VERSION}" | sed 's/^1\.//' | cut -d'.' -f1)
if (( JAVA_MAJOR_VERSION >= 17 ))
Expand Down

0 comments on commit f7face0

Please sign in to comment.