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

Skip to content

Commit 0ad8ed3

Browse files
committed
Kotlin/Bazel: use kotlinc.bat instead of kotlinc.exe on Windows
1 parent 65df2bb commit 0ad8ed3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

java/kotlin-extractor/deps.bzl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ def _get_default_version(repository_ctx):
7676
kotlinc = repository_ctx.which("kotlinc")
7777
if not kotlinc:
7878
return DEFAULT_VERSION
79-
if repository_ctx.os.name == "windows" and not kotlinc.basename.endswith(".exe"):
80-
# for some reason the result from `which` can fail to have exe
81-
kotlinc = repository_ctx.path("%s.exe" % kotlinc)
79+
if repository_ctx.os.name == "windows" and not kotlinc.basename.endswith(".bat"):
80+
kotlinc = repository_ctx.path("%s.bat" % kotlinc)
8281
res = repository_ctx.execute([kotlinc, "-version"])
8382
if not res:
8483
fail("kotlinc -version failed: %s" % res.stderr)

0 commit comments

Comments
 (0)