A combination of sandboxing changes and other bugs makes it impossible for this tool to work. I’ve spent a few hours over the course of several weeks looking for a workaround, including using different NSWorkspace
APIs and a few different scripting-based approaches (both using Scripting Bridge and embedded AppleScripts).
Ultimately I decided that this had already taken more time and headaches than it was worth; Finder extensions and sandboxing problems are both independently difficult to debug, and when combined they’re incredibly frustrating to work with.
I think there probably is a solution involving writing an out-of-process service and communicating with it via XPC. After all, TermHere (available on GitHub) makes this work somehow. (I noticed that TermHere has a commit which adds some editor-related preferences, so maybe similar “open in $EDITOR” support will come to that app someday.)
On Sierra and later, I recommend the following solution.
Based on this comment from Nick Vance, the v2.0 products directory contains two products:
- A script which you can install and run via FastScripts (this script is not code-signed)
- An application which you can command-drag into your Finder toolbar. (this application is code-signed)
These products are also available as the latest release, currently 2.0.
Developed and tested on macOS 10.12.6. (The AppleScript-based products should work with OS X 10.11, too.)
This tooling was written by Chris Dzombak.
Nick Vance is a significant contributor to the AppleScript-based products. View other contributors on GitHub.
See LICENSE.md
.
An “Open Directory in Atom” button for your Finder toolbar, on OS X 10.11:
-
Download and decompress the 1.2 release, which is the last release supporting OS X 10.11.
-
Copy
Open in Atom for Finder.app
to yourApplications
folder. -
Launch the app.
-
Open System Preferences > Extensions and enable the “Open in Atom Finder Extension”:
Developed and tested on OS X 10.11.6. Incompatible with macOS 10.12 or later.
Simply clone the repo; building and archiving the project should be straightforward. There are no dependencies.