All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cc.unitmesh.prompt.validate.ExtToolValidator.kt Maven / Gradle / Ivy

package cc.unitmesh.prompt.validate

/**
 * Extension Tool is validate command, like `plantuml xxx.puml`
 */
class ExtToolValidator(private val execCommand: String, override val input: String) : Validator {
    override fun validate(): Boolean {
        val process = Runtime.getRuntime().exec(execCommand)
        val exitCode = process.waitFor()
        return exitCode == 0
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy