diff --git a/Library/Homebrew/extend/os/linux/development_tools.rb b/Library/Homebrew/extend/os/linux/development_tools.rb index ffac99bf6d..af0a123832 100644 --- a/Library/Homebrew/extend/os/linux/development_tools.rb +++ b/Library/Homebrew/extend/os/linux/development_tools.rb @@ -1,5 +1,15 @@ class DevelopmentTools 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 :gcc end