diff options
Diffstat (limited to 'buildSrc/src')
-rw-r--r-- | buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt b/buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt index e02bdd61..715dde2f 100644 --- a/buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt +++ b/buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt @@ -30,12 +30,12 @@ open class CrossPlatformExec : AbstractExecTask<CrossPlatformExec>(CrossPlatform } private fun findCommand(command: String): String { - val command = normalizeCommandPaths(command) + val normalizedCommand = normalizeCommandPaths(command) val extensions = if (isWindows) windowsExtensions else unixExtensions return extensions.map { extension -> - resolveCommandFromFile(Paths.get("$command$extension")) - }.firstOrNull { it.isNotBlank() } ?: command + resolveCommandFromFile(Paths.get("$normalizedCommand$extension")) + }.firstOrNull { it.isNotBlank() } ?: normalizedCommand } private fun resolveCommandFromFile(commandFile: Path) = @@ -60,4 +60,4 @@ open class CrossPlatformExec : AbstractExecTask<CrossPlatformExec>(CrossPlatform // then replace all forward slashes with whatever the separator actually is .replace(forwardSlashSeparator, separator) } -}
\ No newline at end of file +} |