aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src
diff options
context:
space:
mode:
Diffstat (limited to 'buildSrc/src')
-rw-r--r--buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt12
1 files changed, 4 insertions, 8 deletions
diff --git a/buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt b/buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt
index feb32cac..a68329d8 100644
--- a/buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt
+++ b/buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt
@@ -20,16 +20,12 @@ open class CrossPlatformExec : AbstractExecTask<CrossPlatformExec>(CrossPlatform
commandLine[0] = findCommand(commandLine[0])
}
- if (isWindows) {
- if (commandLine.isNotEmpty() && commandLine[0].isNotBlank()) {
- commandLine
- }
- commandLine.add(0, "/c")
- commandLine.add(0, "cmd")
+ if (isWindows && commandLine.isNotEmpty() && commandLine[0].isNotBlank()) {
+ this.commandLine = listOf("cmd", "/c") + commandLine
+ } else {
+ this.commandLine = commandLine
}
- this.commandLine = commandLine
-
super.exec()
}