in plugin-rust-agent/src/main/kotlin/jetbrains/buildServer/rust/CargoCommandBuildSession.kt [167:182]
override fun getExecutablePath(): String {
val script = File(runnerContext.workingDirectory, "multi-command-line-${UUID.randomUUID()}.cmd")
val stream = script.outputStream().bufferedWriter()
for (command in commands) {
stream.appendLine("cd ${command.workingDirectory}")
val argumentLine = when (runnerContext.virtualContext.targetOSType) {
OSType.WINDOWS -> command.arguments.joinToString(" ")
else -> command.arguments.joinToString(separator = "\" \"", prefix = "\"", postfix = "\"")
}
stream.appendLine("${command.executablePath} $argumentLine")
}
stream.close()
script.setExecutable(true)
filesToClean.add(script)
return script.absolutePath
}