mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Bazel/kotlin: make version detection more robust
This commit is contained in:
@@ -80,9 +80,8 @@ def _get_default_version(repository_ctx):
|
||||
if not res:
|
||||
fail("kotlinc -version failed: %s" % res.stderr)
|
||||
out = res.stderr.split(" ")
|
||||
if len(out) < 3:
|
||||
fail("malformed kotlinc -version output: %s" % res.stdout)
|
||||
return out[2]
|
||||
kotlinc_jvm_index = out.index("kotlinc-jvm")
|
||||
return out[kotlinc_jvm_index + 1]
|
||||
|
||||
def _get_available_version(version):
|
||||
for available_version in reversed(VERSIONS):
|
||||
|
||||
Reference in New Issue
Block a user