aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src
diff options
context:
space:
mode:
authorKamil Doległo <9080183+kamildoleglo@users.noreply.github.com>2021-04-06 15:34:39 +0200
committerGitHub <noreply@github.com>2021-04-06 15:34:39 +0200
commit6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d (patch)
tree978d2cac1d7cd91f322fff2da8186797aadde5b9 /buildSrc/src
parent6756bad5e9d5ebd996275e17bc3ea4f07aea54f4 (diff)
downloaddokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.tar.gz
dokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.tar.bz2
dokka-6b2e9382a298045c1d3c39bdb3c33cdc0eebf38d.zip
Fix some compiler warnings (#1812)
Diffstat (limited to 'buildSrc/src')
-rw-r--r--buildSrc/src/main/kotlin/org/jetbrains/CrossPlatformExec.kt8
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
+}