Skip to content

Regression related to process.env.PATH #550

Closed
atom/atom
#4064
@thomasjo

Description

I'm assuming this is controlled by Atom Shell and not Atom, so I'm reporting it here; process.env.PATH does no longer match the user's $PATH environment variable. It is instead some form of system default, "sanitized" value.

This regression seems specific to OS X. I have verified process.env.Path is not "sanitized" on Windows 8.1 running Atom v0.120.0. The inconsistency might be accidental because on Windows the environment variable is named Path and not PATH. I have not tested to see if the regression also occurs on any GNU/Linux distributions.

Tried to scan through the recent commits to figure out when this regression got introduced, but had no such luck... perhaps it's related to the recently upgraded Chromium?

All other environment variables are correctly read (and passed to) Atom. Which means that this works

$ EVERYTHING=/is/awesome atom

in that the variable can be read in Atom via e.g. console.log(process.env.EVERYTHING), whereas this

$ PATH=$PATH:/ermahgerd atom

does not. Regardless of what I do, console.log(process.env.PATH) always displays /usr/bin:/bin:/usr/sbin:/sbin.


Update:

Tested with Atom v0.120.0 and Atom built from source, running on OS X Yosemite Beta 1.

Installing fresh copies of OS X 10.9.4 and 10.10 in VMs now, to see if I can reproduce the old behavior and the regression.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions