FormulaInstaller: reset git_available? when installing git
Closes Homebrew/homebrew#43693 Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
2b835551d7
commit
3638c057f0
@ -451,6 +451,9 @@ class FormulaInstaller
|
|||||||
|
|
||||||
ohai "Summary" if verbose? || show_summary_heading?
|
ohai "Summary" if verbose? || show_summary_heading?
|
||||||
puts summary
|
puts summary
|
||||||
|
|
||||||
|
# let's reset Utils.git_available? if we just installed git
|
||||||
|
Utils.clear_git_available_cache if formula.name == "git"
|
||||||
ensure
|
ensure
|
||||||
unlock
|
unlock
|
||||||
end
|
end
|
||||||
|
|||||||
@ -21,5 +21,11 @@ module Utils
|
|||||||
rescue
|
rescue
|
||||||
raise "Git is unavailable"
|
raise "Git is unavailable"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
raise "Git is unavailable" unless git_available?
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.clear_git_available_cache
|
||||||
|
remove_instance_variable(:@git) if instance_variable_defined?(:@git)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user