Skip to content

Commit

Permalink
Prevent adding empty/blank compilerFlags to a command (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunohensel authored Oct 4, 2024
1 parent 503f2ad commit 9f9fda2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ class KotlinCompiler(private val toolPaths: ToolPaths, private val outputDirecto
file.toString(),
file.parent.resolve("Keep.kt").toString()
).apply {
// TODO: Do something smarter in case a flag looks like -foo="something with space"
addAll(compilerFlags.split(' '))
if (compilerFlags.isNotEmpty() || compilerFlags.isNotBlank()) {
// TODO: Do something smarter in case a flag looks like -foo="something with space"
addAll(compilerFlags.split(' '))
}
}

return command.toTypedArray()
Expand Down

0 comments on commit 9f9fda2

Please sign in to comment.