Author: bodewig
Date: Thu Mar 25 14:14:53 2010
New Revision: 927416
URL: http://svn.apache.org/viewvc?rev=927416&view=rev
Log:
bash completion failes if ant throws an exception. Submitted by Omer Shapira.
PR 48980
Modified:
ant/core/trunk/CONTRIBUTORS
ant/core/trunk/WHATSNEW
ant/core/trunk/contributors.xml
ant/core/trunk/src/script/complete-ant-cmd.pl
Modified: ant/core/trunk/CONTRIBUTORS
URL:
http://svn.apache.org/viewvc/ant/core/trunk/CONTRIBUTORS?rev=927416&r1=927415&r2=927416&view=diff
==============================================================================
Binary files - no diff available.
Modified: ant/core/trunk/WHATSNEW
URL:
http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=927416&r1=927415&r2=927416&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Mar 25 14:14:53 2010
@@ -64,6 +64,10 @@ Fixed bugs:
* email : IO error sending mail with plain mimetype
Bug 48932
+ * the complete-ant-cmd.pl script failed to create a proper cache of
+ target if "ant -p" failed.
+ Bugzilla Report 48980
+
Other changes:
--------------
Modified: ant/core/trunk/contributors.xml
URL:
http://svn.apache.org/viewvc/ant/core/trunk/contributors.xml?rev=927416&r1=927415&r2=927416&view=diff
==============================================================================
--- ant/core/trunk/contributors.xml (original)
+++ ant/core/trunk/contributors.xml Thu Mar 25 14:14:53 2010
@@ -974,6 +974,10 @@
<last>Rossmueller</last>
</name>
<name>
+ <first>Omer</first>
+ <last>Shapira</last>
+ </name>
+ <name>
<first>Øystein</first>
<last>Gisnås</last>
</name>
Modified: ant/core/trunk/src/script/complete-ant-cmd.pl
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/script/complete-ant-cmd.pl?rev=927416&r1=927415&r2=927416&view=diff
==============================================================================
--- ant/core/trunk/src/script/complete-ant-cmd.pl (original)
+++ ant/core/trunk/src/script/complete-ant-cmd.pl Thu Mar 25 14:14:53 2010
@@ -83,7 +83,7 @@ sub getTargets {
# cache-file.
my $cacheFile = $buildFile;
$cacheFile =~ s|(.*/)?(.*)|${1}.ant-targets-${2}|;
- if ((!-e $cacheFile) || (-M $buildFile) < (-M $cacheFile)) {
+ if ((!-e $cacheFile) || (-z $cacheFile) || (-M $buildFile) < (-M
$cacheFile)) {
open( CACHE, '>'.$cacheFile ) || die "can\'t write $cacheFile: $!\n";
open( HELP, "$antCmd -projecthelp -f '$buildFile'|" ) || return();
my %targets;