mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Bazel/Kotlin: use plain kotlinc instead of result of repository_ctx.which
This commit is contained in:
@@ -73,12 +73,9 @@ def _get_default_version(repository_ctx):
|
||||
default_version = repository_ctx.getenv("CODEQL_KOTLIN_SINGLE_VERSION")
|
||||
if default_version:
|
||||
return default_version
|
||||
kotlinc = repository_ctx.which("kotlinc")
|
||||
if not kotlinc:
|
||||
if not repository_ctx.which("kotlinc"):
|
||||
return DEFAULT_VERSION
|
||||
if repository_ctx.os.name == "windows" and not kotlinc.basename.endswith(".bat"):
|
||||
kotlinc = repository_ctx.path("%s.bat" % kotlinc)
|
||||
res = repository_ctx.execute([kotlinc, "-version"])
|
||||
res = repository_ctx.execute(["kotlinc", "-version"])
|
||||
if not res:
|
||||
fail("kotlinc -version failed: %s" % res.stderr)
|
||||
out = (res.stdout or res.stderr).split(" ")
|
||||
|
||||
Reference in New Issue
Block a user