From 7166289ad757641e54812bde742ea8c883510b0b Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 17 Apr 2018 12:04:53 +0100 Subject: [PATCH] os/mac/xcode: revert an installed? guard removal. Fixes #4084. --- Library/Homebrew/os/mac/xcode.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 00ee5030e6..2e4ec63819 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -280,7 +280,9 @@ module OS def detect_version # CLT isn't a distinct entity pre-4.3, and pkgutil doesn't exist # at all on Tiger, so just count it as installed if Xcode is installed - return MacOS::Xcode.version if MacOS::Xcode.version < "3.0" + if MacOS::Xcode.installed? && MacOS::Xcode.version < "3.0" + return MacOS::Xcode.version + end version = nil [MAVERICKS_PKG_ID, MAVERICKS_NEW_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].each do |id|