Doesn't detect Chrome on macOS Catalina
Ever since I updated to macOS Catalina (currently at 10.15.2 (19C57)) defaultbrowser stopped detecting Chrome if it's the currently active browser. It broke a script I use to toggle between Chrome (which I use at work) & Firefox (which I use at home) as a default browser.
If Firefox is the default, I get this:
$ defaultbrowser
opera
gif-brewery-3
torbrowser
beta
* firefox
console
canary
dev
firefoxdeveloperedition
nightly
chrome
browser
iterm2
desktop
chromium
vivaldi
safari
27ef764e1843433bb31581d42d97c90c
safaritechnologypreview
However, if Chrome is the default, I get this:
$ defaultbrowser
opera
gif-brewery-3
chrome
beta
torbrowser
console
canary
dev
firefoxdeveloperedition
nightly
firefox
browser
iterm2
desktop
chromium
vivaldi
safari
27ef764e1843433bb31581d42d97c90c
safaritechnologypreview
I use defaultbrowser from Homebrew, fully updated.
I'm not on Catalina yet. Once I'll get there I'll look into this.
Same issue here but with Brave Browser on Big Sur
The problem also present on Monterey (macOS 12) - I guess sort of stating the obvious
For me, defaultbrowser browser works for Brave. Seems like its only using the last word of the app name as the Brave is called "Brave Browser" in /Applications.