os/linux/ld: handle nonexistent ld.so.conf more gracefully
Fixes #18458
This commit is contained in:
parent
d767c96ecb
commit
65731faf1d
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user