development_tools: fix LLVM Clang 10+ version detection

This commit is contained in:
Bo Anderson 2021-03-07 20:13:32 +00:00
parent 344ab02f18
commit e9b2a6db7a
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -66,7 +66,7 @@ class DevelopmentTools
@llvm_clang_build_version ||= begin
path = Formulary.factory("llvm").opt_prefix/"bin/clang"
if path.executable? &&
(build_version = `#{path} --version`[/clang version (\d\.\d\.\d)/, 1])
(build_version = `#{path} --version`[/clang version (\d+\.\d\.\d)/, 1])
Version.new build_version
else
Version::NULL