Repository navigation
Save and restore the environment for windows - #11337
joefitzgerald wants to merge 3 commits into
Conversation
6c4e4cc to
6a5b68f
Compare
|
I talked about this with the team this morning and there's some concern that persisting the environment across an exit is the right thing to do. Can you clarify what this is useful for? What if my environment changes between invocations of Atom? Shouldn't Atom always have the most up-to-date environment? Regarding updating the environment of an already running window from the command line, is this much more useful than changing it via the console in the Developer Tools? |
This logic only kicks in when Atom is launched via Dock / Finder / Spotlight. When it is launched from a terminal, the environment is reset to that of the terminal. I suppose there is an edge case here where a user launches a bare The purpose of this part of the PR (there are others) is: suppose you start atom from the terminal. The environment is set very specifically to work for a specific project folder / window. Then you quit atom, and relaunch it (accidentally forgetting to launch from the terminal, and instead launching from the Dock or Spotlight or Finder). Your prior window(s) launch and the environment for each remains the way you intended. You can resume your work without futzing with closing all Atom windows, and launching each one individually from the right terminal window. Without this change, the environment for the Atom window is broken in many scenarios depending on the flow with which the user launches Atom windows. This presents a cognitive burden to the user who has to grok "how did I launch this last time??" (if they even remember).
Yes, because a user shouldn't have to open the developer tools to update their environment. If the user invokes |
|
Modifying the already open environment is a much easier sell than persisting an environment. Perhaps it should be in its own PR? |
- Partially Fixes #4126
- Allows serialization to always work against the most recent environment for the Window
6a5b68f to
34eae59
Compare
This PR more robustly handles the environment in atom-window and the browser window. It:
FOO=blah atom .andFOO=bleh atom .to result in an updated environment for an existing window ("Should process.env be updated if atom is invoked from the shell for the same directory multiple times?" from Inconsistent environment and behaviour #4126)Note: This fix is recommended for cherry picking into the beta channel once merged, as it fixes issues present in the 1.7.x beta.
/cc @lee-dohm