fun execute()

in plugins/gradle/src/main/kotlin/io/kotless/plugin/gradle/utils/CommandLine.kt [22:33]


    fun execute(exec: String, args: List<String>, envs: Map<String, String>, workingDir: File, redirectStdout: Boolean, redirectErr: Boolean): Int {
        return CommandLineUtils.executeCommandLine(
            Commandline().apply {
                workingDirectory = workingDir
                executable = exec.trim()
                for ((key, value) in envs) {
                    addEnvironment(key, value)
                }
                addArguments(args.toTypedArray())
            }, getConsumer(redirectStdout), getConsumer(redirectErr)
        )
    }