aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formulary.rb
diff options
context:
space:
mode:
authorUladzislau Shablinski2016-08-06 11:22:12 +0300
committerXu Cheng2016-08-06 16:22:12 +0800
commit63c563f97074bdfb2ef8bf5388b216d137087c3c (patch)
tree03199e494d9091c196fd8b0767d20b269ddb885a /Library/Homebrew/formulary.rb
parent8ec59253df47b9e597bc6a5ad488c42e035c0351 (diff)
downloadbrew-63c563f97074bdfb2ef8bf5388b216d137087c3c.tar.bz2
Fix update commit for non-HEAD kegs with head spec (#644)
If we try to call `Formulary.from_keg(f, :head)` on the keg that is not HEAD-keg itself, we don't need to update commit of returned formula and should use just HEAD version with nil commit. Same is true for `ARGV.resolved_formulae`
Diffstat (limited to 'Library/Homebrew/formulary.rb')
-rw-r--r--Library/Homebrew/formulary.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index 20f115f13..f7a4be817 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -246,7 +246,7 @@ class Formulary
end
end
f.build = tab
- f.version.update_commit(keg.version.version.commit) if f.head?
+ f.version.update_commit(keg.version.version.commit) if f.head? && keg.version.head?
f
end