diff --git a/Library/Homebrew/os/linux/ld.rb b/Library/Homebrew/os/linux/ld.rb index 9227792b29..b4a033b962 100644 --- a/Library/Homebrew/os/linux/ld.rb +++ b/Library/Homebrew/os/linux/ld.rb @@ -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