Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ› Fix a loop for setting env vars #748

Merged
merged 3 commits into from
Mar 13, 2020
Merged

Conversation

RaeesBhatti
Copy link
Contributor

- Summary
Fixes: #747

- Test plan

  • Added tests
  • Have a .env file in your project root
  • Access those vars in Netlify Functions via netlify dev

- Description for the changelog

  • Use Object.entries instead of Object.values πŸ€¦πŸ½β€β™‚οΈ

- A picture of a cute animal (not mandatory but encouraged)
πŸ™ˆ

@RaeesBhatti RaeesBhatti changed the title πŸ› Fix a loop for setting env vars πŸ› Fix a loop for setting env vars Mar 13, 2020
@@ -64,6 +64,49 @@ test.serial('netlify dev functions timeout', async t => {
})
})

test('netlify dev env file', async t => {
let data = ""
await new Promise((resolve, reject) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small detail: using a HTTP client library like got might help remove some lines of code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing at a time 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local environment variables not loaded in CLI 2.38.0+
2 participants