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

dotenv-expand loads from process.env even when ignoreEnvVars is true #890

Closed
2 of 4 tasks
Toilal opened this issue Mar 17, 2022 · 1 comment
Closed
2 of 4 tasks
Labels
bug Something isn't working

Comments

@Toilal
Copy link
Contributor

Toilal commented Mar 17, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When using both ignoreEnvVars: true and expandVariables: true dotenv-expand` still load configuration from environment variables.

Minimum reproduction code

https://github.com/Toilal/nest-config-ignore-env-vars-repro

Steps to reproduce

  1. Clone the repository
  2. npm install
  3. MY_VAR=KO npm run start:dev
  4. https://localhost:3000

Expected behavior

This should display OK, but KO is displayed. This means the environment variable is loaded from process.env with the following config.

imports: [ConfigModule.forRoot({
  expandVariables: true,
  ignoreEnvVars: true
})],

Package version

1.2.0

NestJS version

8.2.3

Node.js version

16

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@Toilal Toilal added the bug Something isn't working label Mar 17, 2022
@kamilmysliwiec
Copy link
Member

#245 (comment)

@nestjs nestjs locked and limited conversation to collaborators Mar 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants