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

Skip to content

Commit 24c7ad5

Browse files
committed
Bazel/Kotlin: use plain kotlinc instead of result of repository_ctx.which
1 parent 0ad8ed3 commit 24c7ad5

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

java/kotlin-extractor/deps.bzl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,9 @@ def _get_default_version(repository_ctx):
7373
default_version = repository_ctx.getenv("CODEQL_KOTLIN_SINGLE_VERSION")
7474
if default_version:
7575
return default_version
76-
kotlinc = repository_ctx.which("kotlinc")
77-
if not kotlinc:
76+
if not repository_ctx.which("kotlinc"):
7877
return DEFAULT_VERSION
79-
if repository_ctx.os.name == "windows" and not kotlinc.basename.endswith(".bat"):
80-
kotlinc = repository_ctx.path("%s.bat" % kotlinc)
81-
res = repository_ctx.execute([kotlinc, "-version"])
78+
res = repository_ctx.execute(["kotlinc", "-version"])
8279
if not res:
8380
fail("kotlinc -version failed: %s" % res.stderr)
8481
out = (res.stdout or res.stderr).split(" ")

0 commit comments

Comments
 (0)