com.baulsupp.oksocial.output.OsxOutputHandler.kt Maven / Gradle / Ivy
package com.baulsupp.oksocial.output
import com.baulsupp.oksocial.output.process.exec
import java.util.concurrent.TimeUnit
open class OsxOutputHandler(responseExtractor: ResponseExtractor) : ConsoleHandler(responseExtractor) {
override suspend fun openPreview(response: R) {
exec(listOf("open", "-f", "-a", "/Applications/Preview.app")) {
redirectError(stdErrLogging)
redirectOutput(stdErrLogging)
timeout(30, TimeUnit.SECONDS)
}
}
}