aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2012-08-25 10:21:29 -0700
committerMike McQuaid2012-08-25 10:21:48 -0700
commit90010f46021c34024dd22a0f61790bb57cb4b5ea (patch)
tree83876ca9a18a527ae4821ea2399e52fd3999158b /Library
parentd9a18d4c1e679d95ff9828f00d246d9b03ccb984 (diff)
downloadbrew-90010f46021c34024dd22a0f61790bb57cb4b5ea.tar.bz2
Fix tests and NoMethodError with no X11 installed.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV.rb5
-rw-r--r--Library/Homebrew/test/test_ENV.rb2
2 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index fd87ffeea..90ff517b1 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -301,9 +301,10 @@ Please take one of the following actions:
end
end
- def x11
+ def x11 silent=false
unless MacOS::X11.installed?
- opoo "You do not have X11 installed, this formula may not build."
+ opoo "You do not have X11 installed, this formula may not build." unless silent
+ return
end
# There are some config scripts here that should go in the PATH
diff --git a/Library/Homebrew/test/test_ENV.rb b/Library/Homebrew/test/test_ENV.rb
index cd9c930ed..7b71e494f 100644
--- a/Library/Homebrew/test/test_ENV.rb
+++ b/Library/Homebrew/test/test_ENV.rb
@@ -15,7 +15,7 @@ class EnvironmentTests < Test::Unit::TestCase
ENV.minimal_optimization
ENV.no_optimization
ENV.libxml2
- ENV.x11
+ ENV.x11 true
ENV.enable_warnings
assert !ENV.cc.empty?
assert !ENV.cxx.empty?