Hey again,

I am stuck with another issue, and I can't figure out what's wrong here. So
I want to invoke Git using AntBuilder.exec, but it consistently refuses to
pass back any program output or even result code to my script. I'm not sure
whether this is a Git thing or Gradle/AntBuilder, or simply my code, but I
tried to stick to the docs of the Ant Exec task. Here's how I invoke it:

project.git = { Object... args ->
    ant.exec(executable: 'git', failonerror: false, logError: true,
            resultproperty: 'gitStatus', outputproperty: 'gitResult',
errorproperty: 'gitError') {
        args.each { arg(value: it) }
    }
            
    println ant['gitStatus']
}


that last line will always print 0, even though the script fails with an
error because Git is returning a status code of 1. Similarly, there is
nothing ever written to gitResult or gitError, even if there is clearly
output when I run the same command on the shell.

Am I missing something?

--
View this message in context: 
http://gradle.1045684.n5.nabble.com/ant-exec-and-outputting-results-tp4685992p4685992.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to