From f7face0340047056d3a4c211521f72e0ee43a545 Mon Sep 17 00:00:00 2001 From: Andrey Shcheglov Date: Fri, 17 Mar 2023 20:11:14 +0300 Subject: [PATCH] Ignore `_JAVA_OPTIONS` and `JAVA_TOOL_OPTIONS` if they're set (#18) --- bin/diktat | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/diktat b/bin/diktat index 19a8358..766784b 100755 --- a/bin/diktat +++ b/bin/diktat @@ -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 ))