Re:Stupid Unix Tricks
by majewsky on Thursday October 17, 2019 @11:15AM
(#21282916)
I think this snippet needs some context. In all contexts that I can imagine, the first line should actually be
[ Parent
| on HN ]
That seems more reasonable, but it's not what the author wrote. He precedes the snippet with "Don’t try to install things with brew if brew is not installed", so his intention does seem to be to swallow errors silently, which is definitely weird.
He might want his .bashrc to work on both macos and linux.
IME .bashrc already doesn't work the same on OS X, though, so that's still a weird reason.