extend/os/linux/development_tools: handle no /usr/bin/gcc

Fixes #13896.
This commit is contained in:
Bo Anderson 2022-09-20 13:06:31 +01:00
parent 8de3e93715
commit e526c65566
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -35,7 +35,10 @@ class DevelopmentTools
sig { returns(T::Boolean) } sig { returns(T::Boolean) }
def system_gcc_too_old? def system_gcc_too_old?
gcc_version("/usr/bin/gcc") < OS::LINUX_GCC_CI_VERSION gcc = "/usr/bin/gcc"
return true unless File.exist?(gcc)
gcc_version(gcc) < OS::LINUX_GCC_CI_VERSION
end end
sig { returns(T::Hash[String, T.nilable(String)]) } sig { returns(T::Hash[String, T.nilable(String)]) }