diff options
| author | Tim D. Smith | 2016-03-16 22:09:41 -0700 |
|---|---|---|
| committer | Xu Cheng | 2016-03-19 19:14:50 +0800 |
| commit | fe37cc52713e37c24ddf9a7a75f5118594acd3b1 (patch) | |
| tree | a567aeda2f86866d94c33a6267d47f0ae827285e /Library/Homebrew/os/mac/xcode.rb | |
| parent | 87781f2a3734ad778660126fb2bc9681092f5951 (diff) | |
| download | brew-fe37cc52713e37c24ddf9a7a75f5118594acd3b1.tar.bz2 | |
Revert "Avoid constructing paths by string interpolation"
This reverts commit 8c7f3d859e8f715b6c63e4fe75e7a636aee4167f.
Diffstat (limited to 'Library/Homebrew/os/mac/xcode.rb')
| -rw-r--r-- | Library/Homebrew/os/mac/xcode.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 31b6d227d..b951b1232 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 - (prefix/"Toolchains/XcodeDefault.xctoolchain") if installed? && version >= "4.3" + Pathname.new("#{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? - [(prefix/"usr/bin/xcodebuild"), which("xcodebuild")].uniq.each do |path| - if path.file? + %W[#{prefix}/usr/bin/xcodebuild #{which("xcodebuild")}].uniq.each do |path| + if File.file? path Utils.popen_read(path, "-version") =~ /Xcode (\d(\.\d)*)/ return $1 if $1 end |
