-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Support ( in path and actually set JAVA_OPTS #5214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The current logic for printing %JAVA_HOME% inside if ( ) block failes if the path contains a `(` which is the case for 32bit java (`C:\Program Files (x86)\java\jdk`) The current logic for appending to JAVA_OPTS does not work as it will be expanded while interpreting the else block. Use goto instead.
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'. |
This was introduced by @StefanScherer in #4913 @StefanScherer can you check this out and let us know if it works in your testing? |
if defined JAVA_EXE ( | ||
echo Using JAVA_HOME=%JAVA_HOME% retrieved from %ProgramData%\Oracle\java\javapath\java.exe | ||
) | ||
if defined JAVA_EXE echo Using JAVA_HOME=%JAVA_HOME% retrieved from %ProgramData%\Oracle\java\javapath\java.exe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is definitely the more elegant way without the braces solving the problem showing and old variable
@suyograo I've got some minutes to test the PR:
It still works finding and setting JAVA_HOME, I only cloned the repo without JRuby, so the other error is normal. LGTM |
The current logic for printing %JAVA_HOME% inside if ( ) block failes if the path contains a `(` which is the case for 32bit java (`C:\Program Files (x86)\java\jdk`) The current logic for appending to JAVA_OPTS does not work as it will be expanded while interpreting the else block. Use goto instead. Fixes #5214
The current logic for printing %JAVA_HOME% inside if ( ) block failes if the path contains a `(` which is the case for 32bit java (`C:\Program Files (x86)\java\jdk`) The current logic for appending to JAVA_OPTS does not work as it will be expanded while interpreting the else block. Use goto instead. Fixes #5214
The current logic for printing %JAVA_HOME% inside if ( ) block failes if the path contains a `(` which is the case for 32bit java (`C:\Program Files (x86)\java\jdk`) The current logic for appending to JAVA_OPTS does not work as it will be expanded while interpreting the else block. Use goto instead. Fixes #5214
The current logic for printing %JAVA_HOME% inside if ( ) block failes if the path contains a
(
which is the case for 32bit java (C:\Program Files (x86)\java\jdk
)The current logic for appending to JAVA_OPTS does not work as it will be expanded while interpreting the else block. Use goto instead.
Personally I do not at all like that this glutters all my global environemnt, but hey I guess to each its own taste :)