Skip to content

Commit 0df2bdf

Browse files
committed
Parse "openjdk" version
This relates to jxmorris12#19.
1 parent b0e4dcd commit 0df2bdf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎download_lt.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ def get_newest_possible_languagetool_version():
4848
output = subprocess.check_output([java_path, '-version'],
4949
stderr=subprocess.STDOUT,
5050
universal_newlines=True)
51-
# https://www.oracle.com/technetwork/java/javase/versioning-naming-139433.html
51+
5252
match = re.search(
53-
r'^java version "(?P<major1>\d+)\.(?P<major2>\d+)\.[^"]+"$',
53+
r'^(?:java|openjdk) version "(?P<major1>\d+)\.(?P<major2>\d+)\.[^"]+"$',
5454
output,
5555
re.MULTILINE)
5656
if not match:

0 commit comments

Comments
 (0)