Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

🐛 Fix $NODE_PATH being unset when using -a to add project - #12006

Closed
rahatarmanahmed wants to merge 1 commit into
atom:masterfrom
rahatarmanahmed:fix-nodepath-env
Closed

rahatarmanahmed wants to merge 1 commit into
atom:masterfrom
rahatarmanahmed:fix-nodepath-env

Conversation

@rahatarmanahmed

@rahatarmanahmed rahatarmanahmed commented Jun 19, 2016 •

Copy link
Copy Markdown
Contributor

When the -a flag is used, atom replaces env of the existing window. Since this existing window doesn't rerun init-application-window.coffee, the $NODE_PATH env variable becomes unset. This commit moves setting $NODE_PATH earlier in the window creation process so that it gets set regardless. This fixes the issue where fuzzy-finder's indexing task cannot find the 'atom' module because the $NODE_PATH becomes unset.

When the -a flag is used, atom replaces env of the existing window. Since this existing window doesn't run `init-application-window.coffee`, the $NODE_PATH env variable becomes unset. This commit moves setting $NODE_PATH earlier in the window creation process so that it gets set regardless. This fixes the issue where fuzzy-finder's indexing task cannot find the 'atom' module because the $NODE_PATH becomes unset.
@winstliu

Copy link
Copy Markdown
Contributor

/cc @lee-dohm

@gregberge

Copy link
Copy Markdown

👍 please!

@maxbrunsfeld

Copy link
Copy Markdown
Contributor

Hi @rahatarmanahmed, thanks so much for this contribution. We ended up deciding to solve the problem a different way; we put the NODE_PATH logic in the renderer process rather than the main process, mainly because renderer process code is easier to test, and some related code was already there.

Still, your diagnosis of the problem was super valuable, and I'm really sorry we let this PR go unanswered for so long.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants