facelessuser / MarkdownPreview

Markdown preview and build plugin for Sublime Text https://facelessuser.github.io/MarkdownPreview/
Other
402 stars 53 forks source link

Browser option doesn't work on macOS Big Sur with Choosy #137

Closed revolter closed 2 years ago

revolter commented 2 years ago

I'm using Choosy as the default browser, but this extension always opens the preview in Safari.

This happens even if I set

{
    "browser": "/Applications/Choosy.app"
}

or

{
    "browser": "/Applications/Choosy.app/Contents/MacOS/Choosy"
}
facelessuser commented 2 years ago

I'll have to take a look this weekend. I'm unaware of anything that prevents a specific browser from opening, but I'll verify again the setting on macOS.

facelessuser commented 2 years ago

As choosy doesn't seem to be an actual browser, I imagine that may be why. If pointing it directly to a browser works, and pointing to choosy doesn't, it sounds like a choosy problem, or choosy has to be called in a specific way.

revolter commented 2 years ago

True, but it was made specifically to act as a browser, even if it's not one. This means that any link from any app opens in Choosy for me 🤔

facelessuser commented 2 years ago

I understand, but generally, I want to test if the feature works, not special, abnormal cases that require special workarounds. It would be up to the user to come back here with clear details as to what this abnormal cases requires.

If the feature launches normal browsers fine, but not choosy, then what I would ask of you is what does choosy require extra? I'm not sure I have time to debug odd "sort of browser, but not really cases".

So, my focus will most likely be ensuring the feature generally works, and if not, fixing the problem, and for users to provide me with additional, required details for special cases if we'd like to get them working.

I'll let you know what I find soon.

facelessuser commented 2 years ago

Okay, I verified on macOS that Firefox, Chrome, and Safari all work when specified via browser. I did not specifically test Choosy, but I imagine it is using some "magic" to work. If you would like to investigate what would be required to get Choosy to work and provide more details, I may consider adding a workaround, but I'm not sure I have time to invest in a non-standard approach that is behind a paywall.

facelessuser commented 2 years ago

If it helps, we open HTML via the following way when a browser is specified:

$ open -a "path to browser" file.html

If we need to identify Choosy, and do something special, I would ask, since you are a user of Choosy, what do we need to do?

revolter commented 2 years ago

Thanks for the shell command! After investigating it a bit myself, it seems like it's a Choosy bug (http://feedback.choosyosx.com/forums/6165-general/suggestions/44299875-local-files-are-not-opened-correctly).