Skip to content

Make windows JAVA_HOME handling consistent with linux (#55261)#55362

Merged
rjernst merged 1 commit intoelastic:7.xfrom
rjernst:windows_nojava_7.x
Apr 16, 2020
Merged

Make windows JAVA_HOME handling consistent with linux (#55261)#55362
rjernst merged 1 commit intoelastic:7.xfrom
rjernst:windows_nojava_7.x

Conversation

@rjernst
Copy link
Copy Markdown
Member

@rjernst rjernst commented Apr 16, 2020

In bash, checking for whether an env variable exists uses the -z test,
against a stringified env var, so that the test is actually whether the
env var is empty, but not necessarily undefined. We use this to test
whether JAVA_HOME is set, to determine whether the bundled jdk should be
used. In windows, this test is an actual "undefined" check. This commit
brings the behavior on two systems in sync, opting to allow for an empty
JAVA_HOME in windows to indicate the bundled jdk should be used.

closes #55134

In bash, checking for whether an env variable exists uses the -z test,
against a stringified env var, so that the test is actually whether the
env var is empty, but not necessarily undefined. We use this to test
whether JAVA_HOME is set, to determine whether the bundled jdk should be
used. In windows, this test is an actual "undefined" check. This commit
brings the behavior on two systems in sync, opting to allow for an empty
JAVA_HOME in windows to indicate the bundled jdk should be used.

closes elastic#55134
@rjernst rjernst merged commit 742b69a into elastic:7.x Apr 16, 2020
@rjernst rjernst deleted the windows_nojava_7.x branch April 16, 2020 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant