os/mac/xcode: fallback to clang version for detecting CLT.

For some reason `pkgutil --pkgs` no longer lists the CLT after the
Catalina supplemental update.

Fixes https://github.com/Homebrew/brew/issues/6610
This commit is contained in:
Mike McQuaid 2019-10-16 16:26:57 +01:00
parent 48f54d17f8
commit aae9d39939
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -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