You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ja...@apache.org on 2022/01/15 06:03:24 UTC

[ant] branch master updated: fix ant.bat script for Java 18 security manager configuration/check

This is an automated email from the ASF dual-hosted git repository.

jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git


The following commit(s) were added to refs/heads/master by this push:
     new b690788  fix ant.bat script for Java 18 security manager configuration/check
b690788 is described below

commit b690788b10b73a5a963fb3a72d1749916139cfd2
Author: Jaikiran Pai <ja...@apache.org>
AuthorDate: Sat Jan 15 11:33:02 2022 +0530

    fix ant.bat script for Java 18 security manager configuration/check
---
 src/script/ant.bat | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/script/ant.bat b/src/script/ant.bat
index 69041a5..0cdaf1b 100755
--- a/src/script/ant.bat
+++ b/src/script/ant.bat
@@ -117,16 +117,16 @@ set _JAVACMD=%JAVACMD%
 if "%JAVA_HOME%" == "" goto noJavaHome
 if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
 if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
-goto checkJikes
+goto setSecurityManagerOpt
 
 :noJavaHome
 if "%_JAVACMD%" == "" set _JAVACMD=java.exe
 
 :setSecurityManagerOpt
 "%_JAVACMD%" -XshowSettings:properties 2>&1 | find "java.specification.version = 18"
-if "%ErrorLevel%" == "0" (
-    rem This is Java 18, so set -Djava.security.manager=allow
-    set ANT_OPTS="%ANT_OPTS% -Djava.security.manager=allow"
+if %errorlevel% EQU 0 (
+rem This is Java 18, so set -Djava.security.manager=allow
+set ANT_OPTS=%ANT_OPTS% -Djava.security.manager=allow
 )
 
 :checkJikes