sh: only activate X11 if it's installed

Fixes Homebrew/homebrew#23835.
This commit is contained in:
Jack Nagel 2013-10-31 14:20:29 -05:00
parent 655c6f79b4
commit 643469a17c

View File

@ -6,7 +6,7 @@ module Homebrew extend self
ENV.activate_extensions! ENV.activate_extensions!
if superenv? if superenv?
ENV.x11 = true ENV.x11 = MacOS::X11.installed?
ENV.deps = Formula.installed.select{|f| f.keg_only? and f.opt_prefix.directory? }.map(&:name) ENV.deps = Formula.installed.select{|f| f.keg_only? and f.opt_prefix.directory? }.map(&:name)
end end
ENV.setup_build_environment ENV.setup_build_environment