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

Netlify Dev (Functions): Allow overriding env variables set in app.netlify.com with .env file #734

Closed
RaeesBhatti opened this issue Mar 4, 2020 · 1 comment · Fixed by #735
Assignees

Comments

@RaeesBhatti
Copy link
Contributor

- Do you want to request a feature or report a bug?
Bug

- What is the current behavior?
Env variables set in app.netlify.com override variables in .env files for functions when running with netlify dev.
- If the current behavior is a bug, please provide the steps to reproduce.

  • Link your project to a Netlify site using netlify link
  • Create an env variable in app.netlify.com for your site
  • Create a .env file in your function directory with the same variable name (access that env variable in your function)
  • Run netilfy dev and access your function, see the value for the env var

- What is the expected behavior?

  • .env file in function directory overrides env vars set in app.netlify.com

- Local Environment Information

────────────────────┐
 Environment Info   │
────────────────────┘

  System:
    OS: macOS 10.15.3
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 12.16.1 - ~/.n/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.n/bin/npm
  Browsers:
    Chrome: 80.0.3987.122
    Firefox: 72.0.2
    Safari: 13.0.5
netlify-cli/2.37.0 darwin-x64 node-v12.16.1
@RaeesBhatti RaeesBhatti self-assigned this Mar 4, 2020
@RaeesBhatti
Copy link
Contributor Author

This was initially reported here: #714 (comment)

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 a pull request may close this issue.

1 participant