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

Fix node env - #11153

Merged
lee-dohm merged 1 commit into
masterfrom
fix-node-env
Mar 14, 2016
Merged

lee-dohm merged 1 commit into
masterfrom
fix-node-env

Conversation

@lee-dohm

Copy link
Copy Markdown
Contributor

#11054 wasn't preserving the NODE_PATH environment variable when the process.env was changed. This caused at least one problem: fuzzy-finder could no longer index files. This fix preserves all NODE_ environment variables from the original environment, no matter what other changes are made.

/cc @joefitzgerald @nathansobo

@lee-dohm

Copy link
Copy Markdown
Contributor Author

Since NODE_PATH and NODE_ENV are explicitly set here:

process.env.NODE_PATH = exportsPath
# Make React faster
process.env.NODE_ENV ?= 'production' unless devMode

I figured this was prudent.

@joefitzgerald

Copy link
Copy Markdown
Contributor

You should just move the normalize call into initialize-application-window, instead of having the replaceEnv function. Put it before the NODE_ vars are set but after env is set.

@joshaber joshaber mentioned this pull request Mar 14, 2016
6 tasks done
@nathansobo

Copy link
Copy Markdown
Contributor

Seems like a refinement of #11054, so I'm 🆒 with it.

lee-dohm added a commit that referenced this pull request Mar 14, 2016
@lee-dohm
lee-dohm merged commit 5e8752f into master Mar 14, 2016
@lee-dohm
lee-dohm deleted the fix-node-env branch March 14, 2016 17:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants