diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index ad51e33fc3..651896cfbc 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -320,9 +320,10 @@ module OS next unless File.exist?("#{PKG_PATH}/usr/bin/clang") version = MacOS.pkgutil_info(id)[/version: (.+)$/, 1] - break if version + return version if version end - version + + detect_clang_version end end end