shims/super/cc: detect High Sierra differently.
Don't rely on `RUBY_PLATFORM`'s kernel version as it's the machine that Ruby was built on (10.5) for portable ruby.
This commit is contained in:
parent
2901c36798
commit
25249f0114
@ -167,6 +167,7 @@ export HOMEBREW_PROCESSOR
|
|||||||
export HOMEBREW_PRODUCT
|
export HOMEBREW_PRODUCT
|
||||||
export HOMEBREW_OS_VERSION
|
export HOMEBREW_OS_VERSION
|
||||||
export HOMEBREW_MACOS_VERSION
|
export HOMEBREW_MACOS_VERSION
|
||||||
|
export HOMEBREW_MACOS_VERSION_NUMERIC
|
||||||
export HOMEBREW_USER_AGENT
|
export HOMEBREW_USER_AGENT
|
||||||
export HOMEBREW_USER_AGENT_CURL
|
export HOMEBREW_USER_AGENT_CURL
|
||||||
|
|
||||||
|
@ -122,12 +122,7 @@ then
|
|||||||
xcode_path="$(/usr/bin/xcode-select -print-path 2>/dev/null)"
|
xcode_path="$(/usr/bin/xcode-select -print-path 2>/dev/null)"
|
||||||
if [[ -z "$xcode_path" ]]
|
if [[ -z "$xcode_path" ]]
|
||||||
then
|
then
|
||||||
if [[ -z "$HOMEBREW_MACOS_VERSION" ]]
|
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -ge "100900" ]]
|
||||||
then
|
|
||||||
HOMEBREW_MACOS_VERSION="$(/usr/bin/sw_vers -productVersion)"
|
|
||||||
fi
|
|
||||||
printf -v macos_version_numeric "%02d%02d%02d" ${HOMEBREW_MACOS_VERSION//./ }
|
|
||||||
if [[ "$macos_version_numeric" -ge "100900" ]]
|
|
||||||
then
|
then
|
||||||
popup_stub=1
|
popup_stub=1
|
||||||
fi
|
fi
|
||||||
|
@ -18,7 +18,7 @@ def mac?
|
|||||||
end
|
end
|
||||||
|
|
||||||
def high_sierra_or_later?
|
def high_sierra_or_later?
|
||||||
mac? && RUBY_PLATFORM[/darwin\d+/][/\d+/].to_i >= 17
|
mac? && ENV["HOMEBREW_MACOS_VERSION_NUMERIC"].to_s.to_i >= 101300
|
||||||
end
|
end
|
||||||
|
|
||||||
def linux?
|
def linux?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user