-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Added quotes around %JAVA% usages to handle spaces in path #23822
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
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
|
@seal-mt We have tests for spaces in paths. Can you give a reproduction of this (ie show what concrete paths you have for java which cause the current code to break)? |
|
@rjernst I installed I hope this helps. |
I missed this before. I think the underlying problem is with the loop that finds java when java home is not set. That line needs to be quoted correctly to handle spaces. Then everything else should work. |
When JAVA_HOME is not set we try to detect the location of Java. If its location contains a space, due to a lack of quoting we will be unsuccessful in invoking Java. This commit adds the necessary quoting to handle this case. Relates #23822
When JAVA_HOME is not set we try to detect the location of Java. If its location contains a space, due to a lack of quoting we will be unsuccessful in invoking Java. This commit adds the necessary quoting to handle this case. Relates #23822
When JAVA_HOME is not set we try to detect the location of Java. If its location contains a space, due to a lack of quoting we will be unsuccessful in invoking Java. This commit adds the necessary quoting to handle this case. Relates #23822
|
That's correct @rjernst, and all that is needed here is quotes for that case. I want to get this fixed in 5.5.0 which means I elected to push a fix directly: Thanks so much for the report @seal-mt, we would not have caught this one without your comment above. |
If the java installation path on windows contains spaces (e.g.
c:\Program Files) and%JAVA_HOME%isn't set the batch scripts for startup will fail, because file tests and starting java use only the part before the first space instead of the whole path. I added double quotes around all occurrences of%JAVA%where quotes are necessary to handle spaces.