Update commit when resolving the formula (#536)

This commit is contained in:
Uladzislau Shablinski 2016-07-17 11:56:13 +03:00 committed by Xu Cheng
parent 2633f888d4
commit 092d4712a1
4 changed files with 7 additions and 2 deletions

View File

@ -32,6 +32,10 @@ module HomebrewArgvExtension
resolved_spec = spec(nil) || tab.spec
f.set_active_spec(resolved_spec) if f.send(resolved_spec)
f.build = tab
if f.head? && tab.tabfile
k = Keg.new(tab.tabfile.parent)
f.version.update_commit(k.version.version.commit)
end
end
f
else

View File

@ -246,6 +246,7 @@ class Formulary
end
end
f.build = tab
f.version.update_commit(keg.version.version.commit) if f.head?
f
end

View File

@ -11,7 +11,7 @@ begin
trap("INT", old_trap)
formula = ARGV.formulae.first
formula = ARGV.resolved_formulae.first
formula.extend(Debrew::Formula) if ARGV.debug?
formula.run_post_install
rescue Exception => e

View File

@ -19,7 +19,7 @@ begin
trap("INT", old_trap)
formula = ARGV.formulae.first
formula = ARGV.resolved_formulae.first
formula.extend(Homebrew::Assertions)
formula.extend(Debrew::Formula) if ARGV.debug?