diff --git a/redbot/cogs/audio/manager.py b/redbot/cogs/audio/manager.py index 8cc988eff..df8649279 100644 --- a/redbot/cogs/audio/manager.py +++ b/redbot/cogs/audio/manager.py @@ -72,12 +72,16 @@ async def get_java_version(loop) -> _JavaVersion: # ... # We only care about the major and minor parts though. version_line_re = re.compile(r'version "(?P\d+).(?P\d+).\d+(?:_\d+)?"') + short_version_re = re.compile(r'version "(?P\d+)"') lines = version_info.splitlines() for line in lines: match = version_line_re.search(line) + short_match = short_version_re.search(line) if match: return int(match["major"]), int(match["minor"]) + elif short_match: + return int(short_match["major"]), 0 raise RuntimeError( "The output of `java -version` was unexpected. Please report this issue on Red's "