From 643469a17cac53d4989165a34e3266962d1ad6b0 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 31 Oct 2013 14:20:29 -0500 Subject: [PATCH] sh: only activate X11 if it's installed Fixes Homebrew/homebrew#23835. --- Library/Homebrew/cmd/sh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/sh.rb b/Library/Homebrew/cmd/sh.rb index 82fcc968d8..d05af5bfd0 100644 --- a/Library/Homebrew/cmd/sh.rb +++ b/Library/Homebrew/cmd/sh.rb @@ -6,7 +6,7 @@ module Homebrew extend self ENV.activate_extensions! 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) end ENV.setup_build_environment