mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-10-19 09:43:16 +00:00
fix: use Bash for linux platforms (#1189)
This commit is contained in:
parent
039b7181c3
commit
b501ffad73
1 changed files with 5 additions and 5 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue