Skip to content

macOS: reveal comics in Finder without AppleScript - #576

Open
starlit-void wants to merge 2 commits into
YACReader:developfrom
starlit-void:starlit/finder-reveal-no-applescript
Open

macOS: reveal comics in Finder without AppleScript#576
starlit-void wants to merge 2 commits into
YACReader:developfrom
starlit-void:starlit/finder-reveal-no-applescript

Conversation

@starlit-void

Copy link
Copy Markdown
Contributor

"Open containing folder" on a comic drove Finder through osascript, which sends an Apple Event and therefore trips the macOS automation consent dialog ("YACReaderLibrary wants access to control Finder"). The prompt is opaque to users, since neither Info.plist declares an NSAppleEventsUsageDescription to explain the request, and denying it leaves the menu action silently doing nothing.

Use open -R <path> instead. It reveals and selects the file in Finder with the same result, but goes through Launch Services rather than Apple Events, so no permission is required. This also matches how the rest of the codebase shells out to open.

"Open containing folder" on a comic drove Finder through osascript, which
sends an Apple Event and therefore trips the macOS automation consent
dialog ("YACReaderLibrary wants access to control Finder"). The prompt is
opaque to users, since neither Info.plist declares an
NSAppleEventsUsageDescription to explain the request, and denying it
leaves the menu action silently doing nothing.

Use `open -R <path>` instead. It reveals and selects the file in Finder
with the same result, but goes through Launch Services rather than Apple
Events, so no permission is required. This also matches how the rest of
the codebase shells out to `open`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant