fix: use Bash for linux platforms (#1189)
Some checks failed
Build / Build (push) Has been cancelled
Build / Verify Plugin (push) Has been cancelled

This commit is contained in:
Gleb Mayorov 2026-02-24 15:45:04 +03:00 • committed by GitHub
parent 039b7181c3
commit b501ffad73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -529,11 +529,11 @@ class BashTool(
}
private fun buildShellCommand(command: String): List<String> {
val isWindows = System.getProperty("os.name").lowercase().contains("windows")
return if (isWindows) {
listOf("cmd", "/c", command)
} else {
listOf("sh", "-c", command)
val osName = System.getProperty("os.name").lowercase()
return when {
osName.contains("windows") -> listOf("cmd", "/c", command)
osName.contains("linux") -> listOf("bash", "-c", command)
else -> listOf("sh", "-c", command)
}
}