ladle icon indicating copy to clipboard operation
ladle copied to clipboard

Asking for permissions on MacOS

Open matheusgrieger opened this issue 3 years ago • 4 comments

Is it normal for this library to ask for Finder and other permissions on MacOS? That's the first time I see it happening so I was wondering if it is expected or not. At first I allowed Finder and refused the second one (which I don't remember what it was but it was some Apple service), and then running on another terminal I got asked for permissions again but refused for Finder and it worked both times.

matheusgrieger avatar Sep 01 '22 02:09 matheusgrieger

Yea, (afaik) it happens when we look for the default browser setting using: https://github.com/sindresorhus/default-browser

Without this, we can't have both of these on Mac:

  • automatically try to re-use a tab in Chrome only if Chrome is the default browser
  • automatically open the default browser

For long time, we have been ignoring the default browser and always tried to reuse a tab in Chrome if possible and only after that defaulting to the system browser but some folks not happy about it: https://github.com/tajo/ladle/issues/224

If this permission thing is too spooky might revert back to that. :/

The tab re-use on Chrome/Mac is way too nice to give up imo.

tajo avatar Sep 01 '22 03:09 tajo

That's the thing, it still worked without giving any permissions. And also does CRA, it behaves just like that without asking for extra permissions. It got me a little startled I must say, but if that's expected then no problem. Maybe add that to the docs?

matheusgrieger avatar Sep 01 '22 10:09 matheusgrieger

I'll probably just remove the default browser functionality. You can set the browser through the ENV variable.

tajo avatar Sep 02 '22 07:09 tajo

Thank you for clarifying!

matheusgrieger avatar Sep 02 '22 13:09 matheusgrieger