Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4822de3

Browse files
committed
Kotlin/Bazel: add fail printouts to _default_version
1 parent b8c063e commit 4822de3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

java/kotlin-extractor/deps.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ def _get_default_version(repository_ctx):
8080
if not res:
8181
fail("kotlinc -version failed: %s" % res.stderr)
8282
out = (res.stdout or res.stderr).split(" ")
83+
if "kotlinc-jvm" not in out:
84+
fail("kotlinc -version output does not contain 'kotlinc-jvm': %s" % out)
8385
kotlinc_jvm_index = out.index("kotlinc-jvm")
86+
if kotlinc_jvm_index + 1 >= len(out):
87+
fail("kotlinc -version output does not contain a version after 'kotlinc-jvm': %s" % out)
8488
return out[kotlinc_jvm_index + 1]
8589

8690
def _get_available_version(version):

0 commit comments

Comments
 (0)