MercurialDownloadStrategy: avoid creating Formula object just for opt_prefix

This commit is contained in:
Jack Nagel 2013-10-10 10:31:08 -05:00
parent 4a2fc89c46
commit 05a2261877

View File

@ -634,7 +634,7 @@ class MercurialDownloadStrategy < VCSDownloadStrategy
@path ||= %W[
#{which("hg")}
#{HOMEBREW_PREFIX}/bin/hg
#{Formula.factory('mercurial').opt_prefix}/bin/hg
#{HOMEBREW_PREFIX}/opt/mercurial/bin/hg
#{HOMEBREW_PREFIX}/share/python/hg
].find { |p| File.executable? p }
end