diff options
| author | Stefan Bodewig <bodewig@apache.org> | 2010-03-25 14:14:53 +0000 |
|---|---|---|
| committer | Stefan Bodewig <bodewig@apache.org> | 2010-03-25 14:14:53 +0000 |
| commit | 520de2a8f461209ef5af346d144383c738c47235 (patch) | |
| tree | 481c953067c27fdcf660d55eb64bffc7273fc3a6 /src/script | |
| parent | 16b5178713e9d00a684c8469fa1c44058f55b041 (diff) | |
| download | ant-520de2a8f461209ef5af346d144383c738c47235.tar.gz | |
bash completion failes if ant throws an exception. Submitted by Omer Shapira. PR 48980
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@927416 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/script')
| -rw-r--r-- | src/script/complete-ant-cmd.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/complete-ant-cmd.pl b/src/script/complete-ant-cmd.pl index b58c26e15..37891241b 100644 --- a/src/script/complete-ant-cmd.pl +++ b/src/script/complete-ant-cmd.pl @@ -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; |
