Merge pull request #7530 from Bo98/gcc-10-version

development_tools: fix GCC 10 version detection
This commit is contained in:
FX Coudert 2020-05-09 16:41:21 +02:00 committed by GitHub
commit 7750ae1983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ class DevelopmentTools
path = HOMEBREW_PREFIX/"opt/gcc/bin"/cc
path = locate(cc) unless path.exist?
version = if path &&
build_version = `#{path} --version`[/gcc(?:(?:-\d(?:\.\d)?)? \(.+\))? (\d+\.\d\.\d)/, 1]
build_version = `#{path} --version`[/gcc(?:(?:-\d+(?:\.\d)?)? \(.+\))? (\d+\.\d\.\d)/, 1]
Version.new build_version
else
Version::NULL