DevelopmentTools::locate: Prefer brewed tools [Linux]
This commit is contained in:
parent
bb038c7048
commit
447baab9a0
@ -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