sage-
From: John Cortell [mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 2005 11:20 AM
To: Ant Users List
Subject: RE: launching Ant from a perl script
Sten, thanks for the added info. It seems putting an 'exit /b' at the
end
of ant.bat has the same effect as putting a 'goto
Sten, thanks for the added info. It seems putting an 'exit /b' at the end
of ant.bat has the same effect as putting a 'goto: eof' which has the same
effect as leaving ant.bat unmodified (sort of like putting a return
statement at the end of a C/C++ function that returns void). Again, no
surpris
Indeed. The 'exit' fixes the return-code problem when launching the bat
file from a perl script, but clearly, the 'exit' introduces a much bigger
problem if you're just executing bat files sans perl. Definitely not
something that should be added to run.bat in production! Thanks for the
correcti
I had tried that, too, but that opens up a different can of worms. The perl
script I'm writing can't assume that .pl is registered as an executable
extension (such that one can simply type, for example, runant.pl, at a
command line and the file will automatically by fed to perl.exe). So I
can't
ead (LOGFILE, $logContents, -s $logFile);
>close (LOGFILE);
>
>my $msg = "\n".("*" x 60)."\n";
>my $fail = undef;
>if ($logContents =~ /BUILD SUCCESSFUL\n(Total time: .*$)/) {
> $msg .= "Build completed SUCCESSFULLY\n$1\n&
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 applica