diff options
| author | Charlie Sharpsteen | 2011-10-04 18:35:14 -0700 |
|---|---|---|
| committer | Charlie Sharpsteen | 2011-10-04 18:36:31 -0700 |
| commit | 45365e0ecb0858e7aa96dc8c40cc2b9c5d6db834 (patch) | |
| tree | 0d7c3c14ceddb8e160fe5ba63505c92e929f478a /Library | |
| parent | 16aeea55fd9858bf1eb6af411f48202dbeda53ef (diff) | |
| download | homebrew-45365e0ecb0858e7aa96dc8c40cc2b9c5d6db834.tar.bz2 | |
formula.rb: Don't attempt to mirror unstable URLs
If a build is being influenced by an option such as `--HEAD`. Don't attempt
mirrors if a download fails.
Fixes #7971.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 6143a4689..c2aeec8de 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -557,7 +557,9 @@ private # For brew-fetch and others. def fetch downloader = @downloader - mirror_list = mirrors + # Don't attempt mirrors if this install is not pointed at a "stable" URL. + # This can happen when options like `--HEAD` are invoked. + mirror_list = @spec_to_use == @stable ? mirrors : [] # Ensure the cache exists HOMEBREW_CACHE.mkpath |
