Merge pull request #18459 from Homebrew/missing-ld.so.conf

This commit is contained in:
Carlo Cabrera 2024-09-30 22:47:54 +08:00 committed by GitHub
commit cdc228a5cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,6 +48,8 @@ module OS
sig { params(conf_path: T.any(Pathname, String)).returns(T::Array[String]) }
def self.library_paths(conf_path = Pathname(sysconfdir)/"ld.so.conf")
conf_file = Pathname(conf_path)
return [] unless conf_file.exist?
paths = Set.new
directory = conf_file.realpath.dirname