mirror of
https://github.com/gosticks/brew.git
synced 2026-08-14 13:40:23 +00:00
non_apple_gcc_version: Use preferred_gcc
Check HOMEBREW_PREFIX/"opt/#{CompilerSelector.preferred_gcc}/bin/
This commit is contained in:
@@ -76,7 +76,7 @@ class DevelopmentTools
|
||||
|
||||
def non_apple_gcc_version(cc)
|
||||
(@non_apple_gcc_version ||= {}).fetch(cc) do
|
||||
path = HOMEBREW_PREFIX/"opt/gcc/bin"/cc
|
||||
path = HOMEBREW_PREFIX/"opt/#{CompilerSelector.preferred_gcc}/bin"/cc
|
||||
path = locate(cc) unless path.exist?
|
||||
version = if path &&
|
||||
build_version = `#{path} --version`[/gcc(?:(?:-\d+(?:\.\d)?)? \(.+\))? (\d+\.\d\.\d)/, 1]
|
||||
|
||||
Reference in New Issue
Block a user