Possible regression in `process.env.PATH`


Started seeing a possible regression recently, but I only noticed it a couple of days ago by accident, so not sure when it was first introduced (or if it’s just something with my environment).

Atom on OS X used to inherit the PATH environment variable for the current user, but as of right now, I’m only inheriting the system default;

console.log(process.env.PATH) // returns /usr/bin:/bin:/usr/sbin:/sbin 

Executing the same on Windows 8.1 running Atom v0.120.0 it’s returning the configured value for %Path%, which on Windows is system-wide by default.

Can anyone else confirm this behavior on OS X, or is it just something that’s broken on my system? Haven’t tested on a supported GNU/Linux distro yet, but I expect it will behave similar to OS X.

Tested against Atom v0.120.0 and Atom v0.121.0-2135d3b on OS X Yosemite Beta 1 with user shell set to Zsh.

Package works when I use command line but does not when I click icon in os x

Opened an issue in atom/atom-shell.


I think it depends on how it is started? If you click on it in the dock, then it gets one set of variables, and if you start it from the shell, it gets a different set of variables.

Here is the Stackoverflow topic:

I’m not sure if this is what you’re looking for. I’m also not quite sure whether all of these are different:

  • Click on it in the doc
  • Run it via Spotlight
  • Start it via atom some/dir in a terminal
  • Start it via open -a Atom in a terminal

Failed to spawn command pep8 when file is open from Finder, works from shell

As you can see from the comments in my issue, this actually seems like a regression in OS X Yosemite, and not Atom. Works as expected for all environment variables, except PATH.


is there any solution?


The Issue was resolved in early November 2014. So yes, this has been solved. If there is a new problem, please start a new topic. I’m going to close this one as resolved.

closed #7