aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-09-23 20:57:41 -0400
committerMax Howell2012-09-23 20:57:41 -0400
commita0df6180b7c99f7cb78493bd1c103012e3e328b1 (patch)
tree9666bd38d83c2e5bc23aa15c015dfd064f10c812 /Library
parent7aa38b5d0303ba711c0b4f1c22c7dcfec5eceb9d (diff)
downloadbrew-a0df6180b7c99f7cb78493bd1c103012e3e328b1.tar.bz2
Set DEVELOPER_DIR; Fixes bad xcode-select path
In cases where the xcode-select -print-path is '/' xcrun still hangs indefinitely, setting DEVELOPER_DIR to something (preferably the Xcode path) fixes that. So let's.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/superenv.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb
index 91b302e65..cefacdae3 100644
--- a/Library/Homebrew/superenv.rb
+++ b/Library/Homebrew/superenv.rb
@@ -16,7 +16,6 @@ def superbin
end
def superenv?
- not MacOS::Xcode.bad_xcode_select_path? and # because xcrun won't work
not MacOS::Xcode.folder.nil? and # because xcrun won't work
superbin and superbin.directory? and
not ARGV.include? "--env=std"
@@ -55,6 +54,7 @@ class << ENV
ENV['CMAKE_LIBRARY_PATH'] = determine_cmake_library_path
ENV['ACLOCAL_PATH'] = determine_aclocal_path
ENV['VERBOSE'] = '1' if ARGV.verbose?
+ ENV['DEVELOPER_DIR'] = determine_developer_dir
end
def check
@@ -179,6 +179,15 @@ class << ENV
s
end
+ def determine_developer_dir
+ # If Xcode path is fucked then this is basically a fix. In the case where
+ # nothing is valid, it still fixes most usage to supply a valid path that
+ # is not "/".
+ if MacOS::Xcode.bad_xcode_select_path?
+ (Xcode.prefix || HOMEBREW_PREFIX).to_s
+ end
+ end
+
public
### NO LONGER NECESSARY OR NO LONGER SUPPORTED