Thanks! I was able to apply your solution under Catalina but it doesn't appear to work under macOS Big Sur due to a Homebrew problem.
Error: Fetching /usr/local/Homebrew/Library/Taps/$USER/homebrew-old-openssl failed! fatal: 'origin/master' is not a commit and a branch 'master' cannot be created from it fatal: invalid upstream 'origin/master' Updated 1 tap (homebrew/core). No changes to formulae.
I tried nuking and reinstalling Homebrew from scratch but the error persists.