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

Skip to content

Commit 65df2bb

Browse files
committed
Bazel/Kotlin: add .exe to kotlinc on windows
1 parent b8010f2 commit 65df2bb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

java/kotlin-extractor/deps.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ 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)
7982
res = repository_ctx.execute([kotlinc, "-version"])
8083
if not res:
8184
fail("kotlinc -version failed: %s" % res.stderr)

0 commit comments

Comments
 (0)