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

Disable env when parsing options #922

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Llorx
Copy link

@Llorx Llorx commented Aug 1, 2024

Sometimes you have this library running in another computer with no control over the environment variables (A.K.A. user computer) and in a simple interface, the user expects for it to work as defined in the configuration, so an empty password input should be an empty password sent to postgres, not modified based on the environment variables.

Sometimes support tickets are tedious, so convincing a user that he has a PGPASSWORD env variable (for whatever reason) and the variable is affecting how he expects the configuration to work, is something I prefer to not fight for, hence I added a no_env property to the configuration to avoid applying the env values. It is opt-in so is nothing that could break anything, I guess. If this way is not good, I still would like to discuss ways to avoid env to apply, apart from modifying process.env prior to the parsing, if possible.

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.

1 participant