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

Error when the variable referenced with envvar() doesn't exist #336

Closed
michaeltlombardi opened this issue Mar 1, 2024 · 0 comments · Fixed by #358
Closed

Error when the variable referenced with envvar() doesn't exist #336

michaeltlombardi opened this issue Mar 1, 2024 · 0 comments · Fixed by #358
Assignees
Labels
Doc-Impact Issue-Enhancement The issue is a feature or idea

Comments

@michaeltlombardi
Copy link
Collaborator

Summary of the new feature / enhancement

As a user, I want my configuration to error when referencing an environment variable that doesn't exist instead of receiving an empty string and unpredictable behavior for my configuration.

Currently, the envvar() function returns an empty string when the referenced variable doesn't exist. This may be desirable, but it may also lead to other issues with the configuration.

Proposed technical implementation details (optional)

The envvar() function should either:

  1. Always error when the referenced variable doesn't exist, or
  2. Error by default, but have an optional second boolean parameter that indicates whether it should return an empty string if the variable doesn't exist.

In the latter case, this would enable some flexibility for users while defaulting to a stricter behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Doc-Impact Issue-Enhancement The issue is a feature or idea
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants