Merge pull request #5017 from sjackman/locate
DevelopmentTools::locate: Prefer brewed tools [Linux]
This commit is contained in:
commit
38287e6309
@ -1,5 +1,15 @@
|
|||||||
class DevelopmentTools
|
class DevelopmentTools
|
||||||
class << self
|
class << self
|
||||||
|
def locate(tool)
|
||||||
|
(@locate ||= {}).fetch(tool) do |key|
|
||||||
|
@locate[key] = if (path = HOMEBREW_PREFIX/"bin/#{tool}").executable?
|
||||||
|
path
|
||||||
|
elsif File.executable?(path = "/usr/bin/#{tool}")
|
||||||
|
Pathname.new path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def default_compiler
|
def default_compiler
|
||||||
:gcc
|
:gcc
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user