aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-07-21 16:41:51 -0500
committerJack Nagel2013-07-21 16:41:51 -0500
commit9f2f5c81e9959f208a5f553b1b0aa119afb000e7 (patch)
tree304a5e97a551e68f000fb305a01a23284e4401c8 /Library
parent3807bd220a89cb53b6f48c66c4bb17cb9590c96e (diff)
downloadbrew-9f2f5c81e9959f208a5f553b1b0aa119afb000e7.tar.bz2
Extract bundle_path method from Xcode#prefix
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac/xcode.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index 709d41a04..31dbf8c02 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -51,11 +51,7 @@ module MacOS::Xcode extend self
# fallback for broken Xcode 4.3 installs
Pathname.new("#{V4_BUNDLE_PATH}/Contents/Developer")
else
- # Ask Spotlight where Xcode is. If the user didn't install the
- # helper tools and installed Xcode in a non-conventional place, this
- # is our only option. See: http://superuser.com/questions/390757
- path = MacOS.app_with_bundle_id(V4_BUNDLE_ID) ||
- MacOS.app_with_bundle_id(V3_BUNDLE_ID)
+ path = bundle_path
unless path.nil?
path += "Contents/Developer"
@@ -65,6 +61,13 @@ module MacOS::Xcode extend self
end
end
+ # Ask Spotlight where Xcode is. If the user didn't install the
+ # helper tools and installed Xcode in a non-conventional place, this
+ # is our only option. See: http://superuser.com/questions/390757
+ def bundle_path
+ MacOS.app_with_bundle_id(V4_BUNDLE_ID) || MacOS.app_with_bundle_id(V3_BUNDLE_ID)
+ end
+
def installed?
not prefix.nil?
end