diff options
| author | Charlie Sharpsteen | 2011-08-29 14:55:28 -0700 |
|---|---|---|
| committer | Charlie Sharpsteen | 2011-08-29 15:01:38 -0700 |
| commit | b7808e57f98404bdfe9b078725f97d5e5b81a1f4 (patch) | |
| tree | a4e38602f1c4942e657a6df94e5199e67ffa024f /Library | |
| parent | b644aa151c51ea6fb0ffb69583e2e95ffca24486 (diff) | |
| download | homebrew-b7808e57f98404bdfe9b078725f97d5e5b81a1f4.tar.bz2 | |
formula.rb: Don't curl when DATA is the only patch
Executing `curl(*patches)` was failing on Leopard when `patches` was an empty
list. `git-bisect` identified 48552bb42a69ece4eb2a6d9acf81a0b47adb19c9 as the
commit that caused this bug to surface by adding `--insecure` to the arg list
on Leopard. This is odd because the following both exit with status 2:
curl
curl --insecure
The only apparent difference is that `curl --insecure` prints "no URL
specified!" to stderr along with the usage message.
Also renamed `patches` to `external_patches` as it is more descriptive.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 53f8b9456..fd9bcbb72 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -594,10 +594,12 @@ EOF return if patch_list.empty? - ohai "Downloading patches" - # downloading all at once is much more efficient, especially for FTP - patches = patch_list.collect{|p| p[:curl_args]}.select{|p| p}.flatten - curl(*patches) + external_patches = patch_list.collect{|p| p[:curl_args]}.select{|p| p}.flatten + unless external_patches.empty? + ohai "Downloading patches" + # downloading all at once is much more efficient, especially for FTP + curl(*external_patches) + end ohai "Patching" patch_list.each do |p| |
