0

This is sort of a specific question that seems like it would be better suited over on Atom's user blog, but I figured I would post this here as well as I have actually asked it there and have received no response. I've been having some issues ever since being pushed to switch to Zsh over Bash in macOS Catalina. A lot of the issues seem to be surrounding commands not being recognized under certain circumstances.

As mentioned, the issue I'm currently having has to with with Atom editor and the shell commands that can be installed with it. After downloading Atom and running the Install Shell Commands in the Atom menu, you should be able to launch Atom via the command line with the atom <file> command. My issue is that, the command is not recognized at all until I manually the launch the application once. If I try to use the command, I'm greeted with zsh: command not found: atom. After the application is launched manually (outside of the command line), Zsh no longer reports that it cannot find the command atom command, and it begins to work. This all resets as soon as I turn my computer off and on.

Does anyone know what could be causing this? This never happened pre-Catalina.

1
  • You don't have to stick with zsh.. you can use bash if you prefer – TimD Dec 16 '19 at 6:23
1

I am going to bypass what could be causing it, to tell you how to “cure” it.

First, find out the exact path of “atom” (not Atom.app). It is probably embedded somewhere inside of Atom.app, but it's possible the Install Shell Commands copies it to somewhere else.

If it disappears on a reboot, it might be copied to /tmp (!). If that is the case, do echo $path and copy it to one of those directories.

After you have atom in a location that won't be erased on reboot, ensure that location is in your zsh $path as discussed in How does zsh find commands?

2
  • I will try your solution, but I should mention that I do not have to re-run the Install Shell Commands command again at all, I only have to reopen Atom manually to get the command line atom command to be recognized. – joe_04_04 Dec 16 '19 at 5:56
  • Hmmm, that's interesting. Sounds like the application mounts a disk image that contains atom and the script updates the $path to point to that disk image. After reboot, nothing in the disk image is available until mounted again. – WGroleau Dec 16 '19 at 6:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .