From 6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d Mon Sep 17 00:00:00 2001 From: Kamil Doległo <9080183+kamildoleglo@users.noreply.github.com> Date: Tue, 6 Apr 2021 15:34:39 +0200 Subject: Fix some compiler warnings (#1812) --- buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 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(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(CrossPlatform // then replace all forward slashes with whatever the separator actually is .replace(forwardSlashSeparator, separator) } -} \ No newline at end of file +} -- cgit