Skip to content

Commit 1ccebbe

Browse files
committed
Fix Windows executable extension handling
1 parent ca7471e commit 1ccebbe

File tree

19 files changed

+5
-3
lines changed

19 files changed

+5
-3
lines changed

product/gradle-plugin/src/main/kotlin/PythonTasks.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,10 @@ internal class TaskBuilder(
686686
}
687687

688688
// For consistency between machines, we don't use the PATHEXT variable.
689-
val exts =
690-
if (osName() == "windows") listOf(".exe", ".bat") else listOf("")
689+
val exts = mutableListOf("")
690+
if (osName() == "windows") {
691+
exts += listOf(".exe", ".bat")
692+
}
691693

692694
outer@ for (dir in System.getenv("PATH").split(File.pathSeparator)) {
693695
for (ext in exts) {

0 commit comments

Comments
 (0)