mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Kotlin/Bazel: use kotlinc.bat instead of kotlinc.exe on Windows
This commit is contained in:
@@ -76,9 +76,8 @@ def _get_default_version(repository_ctx):
|
||||
kotlinc = repository_ctx.which("kotlinc")
|
||||
if not kotlinc:
|
||||
return DEFAULT_VERSION
|
||||
if repository_ctx.os.name == "windows" and not kotlinc.basename.endswith(".exe"):
|
||||
# for some reason the result from `which` can fail to have exe
|
||||
kotlinc = repository_ctx.path("%s.exe" % kotlinc)
|
||||
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"])
|
||||
if not res:
|
||||
fail("kotlinc -version failed: %s" % res.stderr)
|
||||
|
||||
Reference in New Issue
Block a user