aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index a15cea3c2..e57c2fc80 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -257,7 +257,11 @@ class GitDownloadStrategy <AbstractDownloadStrategy
safe_system 'git', 'clone', @url, @clone # indeed, leave it verbose
else
puts "Updating #{@clone}"
- Dir.chdir(@clone) { quiet_safe_system 'git', 'fetch', @url }
+ Dir.chdir(@clone) do
+ quiet_safe_system 'git', 'fetch', @url
+ # If we're going to checkout a tag, then we need to fetch new tags too.
+ quiet_safe_system 'git', 'fetch', '--tags' if @spec == :tag
+ end
end
end