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`
This commit is contained in:
parent
8ec59253df
commit
63c563f970
@ -34,7 +34,7 @@ module HomebrewArgvExtension
|
||||
f.build = tab
|
||||
if f.head? && tab.tabfile
|
||||
k = Keg.new(tab.tabfile.parent)
|
||||
f.version.update_commit(k.version.version.commit)
|
||||
f.version.update_commit(k.version.version.commit) if k.version.head?
|
||||
end
|
||||
end
|
||||
f
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user