Hi, first time posting here.
The problem I’m having is that when started via terminal (
atom .), somehow
process.env does not only inherits the environment variables from my shell.
For example, setting
export HELLO=foo and then running
process.env.HELLO would equal
foo as expected.
PWD does not behave the same:
$ echo $PWD Users/bobbypriambodo/Projects/project-path $ atom . # then in Atom console > process.env.PWD "/" # `PWD=$PWD atom .` also behaves the same
The messed up parts also include
PATH. In developing in OCaml, we rely heavily on shell vars; switching projects means we need to adjust the vars accordingly. However, in Atom those vars somehow got overwritten into the global ones (possibly because
PWD="/"?) by who knows what, making Atom unable to find the necessary binaries (which differs between projects) for plugins to work.
How exactly does Atom populate process.env? What files (if any) does it read other than the current shell’s variables? Help is much appreciated.
I’m using MacOS Sierra with Atom 1.21.1.