From 1face808f5f1dc43c887cab421b5c01f7e20fdf7 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Sun, 26 Jul 2015 16:49:16 -0400 Subject: Add guards to calls that would trigger Xcode install requests add guard in Formula#file_modified? to prevent git popup add guard in Superenv.bin before calling MacOS::Xcode.version add guard against missing Xcode/CLT in Xcode.uncached_version return nil instread of 0 in uncached_version when Xcode/CLT are not present, to distinguish from linuxbrew behavior checks against pour_bottle? and needs_relocation?, add guard around keg.relocate_install_names to check pour_bottle?/needs_relocation? as well needs_relocation? becomes skip_relocation?, use cellar attr to indicate relocation instead of does_not_need_relocation MacOS.can_build? becomes MacOS.has_apple_developer_tools? --- Library/Homebrew/os/mac/xcode.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Library/Homebrew/os/mac/xcode.rb') diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 83ba84ff8..40446a8ad 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -76,6 +76,8 @@ module OS return "0" unless OS.mac? + return nil if !MacOS::Xcode.installed? && !MacOS::CLT.installed? + %W[#{prefix}/usr/bin/xcodebuild #{which("xcodebuild")}].uniq.each do |path| if File.file? path Utils.popen_read(path, "-version") =~ /Xcode (\d(\.\d)*)/ -- cgit v1.2.3