Atom command line tool should use LaunchServices!


#1

The command line tool appears to be hardcoded to expect the Atom application to be located at /Applications/Atom.app. Instead LaunchServices (or spotlight if lower level integration is necessary) should be use with the correct bundle identifier to locate and launch.

Atom application not found at ‘/Applications/Atom.app’


#2

You can set the environment var ATOM_PATH to point to your Atom.app location


#3

This will be fixed in Atom v0.72.0. It will still presume Atom is in /Applications, but if it is not found there mdfind is used to locate Atom. You will also be able to set the environment var ATOM_PATH like @x0l suggests.


#4

Why do that instead of using Launch Services?


#5

@eschaton I didn’t think it was possible to run commands like atom --help or atom --foreground with launch services. If it is I’d love to hear about how!


#6

Launch Services is the API by which the atom tool should find the Atom.app application in the filesystem as well as launch it. The structure you’re looking for is LSApplicationParameters, the documentation is pretty straightforward.