I managed to remove a return while fixing this yesterday. The whitespace changes made the diff unreadable so I missed this regression.
Why does this sort of thing still happen?
The short-circuit returns would cause the caching ||= syntax to be skipped. For me on my CLT-less install, this was noticeably slowing down brew for some operations due to the frequent calls to xcodebuild.
In order to better support Xcode-only systems, where X11 libs and
executables live under /usr/X11 but headers live in the SDK, move the
x11_* helper methods into a new module.
This allows us to keep some of the CLT/Xcode-only and Apple X11/XQuartz
logic hidden from outside code, like ENV.x11.
Since Apple's X11 is actually XQuartz, name the module "MacOS::XQuartz".