development_tools: fix GCC 10 version detection

This commit is contained in:
Bo Anderson 2020-05-09 14:31:34 +01:00
parent 9023667f8c
commit 9f4dbd4008

View File

@ -78,7 +78,7 @@ class DevelopmentTools
path = HOMEBREW_PREFIX/"opt/gcc/bin"/cc path = HOMEBREW_PREFIX/"opt/gcc/bin"/cc
path = locate(cc) unless path.exist? path = locate(cc) unless path.exist?
version = if path && 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 Version.new build_version
else else
Version::NULL Version::NULL