Carlo Cabrera bb20b3c720
os/linux/ld: harden brewed_ld_so_diagnostics against TypeError
I think this is a bug in Ruby, but I've no idea how to track it down. I
can reproduce it intermittently in a codespace when `brew install`ing a
large number of formulae.

To work around this:
- cache the return value of `brewed_ld_so_diagnostics` so that we can
  limit the number of calls to `IO.popen`
- retry once when we see a `TypeError`

Closes #17828.
2024-09-16 20:26:35 +08:00
..