ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Cortell <cort...@cox.net>
Subject launching Ant from a perl script
Date Fri, 11 Mar 2005 00:52:33 GMT
Hi,

I'm having a tough time figuring out how to get the return code from an Ant 
invocation when using perl. The problem is that the Ant front end is a .bat 
file (I'm working on Windows). When you invoke a bat file from perl, and 
that bat file in turn invokes  something else (the Java Ant application in 
this case), perl does not capture the return code from that underlying 
application.

In case this is confusing, let me spell out exactly what's going on. If in 
a perl file, I have the following:

      `ant -xyz`;  # invalid invocation; will clearly fail
      print("error is $?\n");

, when I run it, I get:

    error is 0

Surely, people are using Perl to drive Ant builds, so I'm sure there's a 
simple answer to this, but I just can't find it.

John







---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message