aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os/mac/xcode.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/os/mac/xcode.rb')
-rw-r--r--Library/Homebrew/os/mac/xcode.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index b951b1232..31b6d227d 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -50,7 +50,7 @@ module OS
end
def toolchain_path
- Pathname.new("#{prefix}/Toolchains/XcodeDefault.xctoolchain") if installed? && version >= "4.3"
+ (prefix/"Toolchains/XcodeDefault.xctoolchain") if installed? && version >= "4.3"
end
# Ask Spotlight where Xcode is. If the user didn't install the
@@ -79,8 +79,8 @@ module OS
return nil if !MacOS::Xcode.installed? && !MacOS::CLT.installed?
- %W[#{prefix}/usr/bin/xcodebuild #{which("xcodebuild")}].uniq.each do |path|
- if File.file? path
+ [(prefix/"usr/bin/xcodebuild"), which("xcodebuild")].uniq.each do |path|
+ if path.file?
Utils.popen_read(path, "-version") =~ /Xcode (\d(\.\d)*)/
return $1 if $1
end