From ec8e0aa7dbdc74c381dfe9c012711a895ccac6d4 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Fri, 31 Jan 2020 15:21:29 +0100 Subject: Fix CrossPlatformExec.kt --- buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'buildSrc/src') 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(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() } -- cgit