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

[bug] Dynaconf.load_file() no error on missing file(s) #1053

Open
lingfish opened this issue Feb 19, 2024 · 0 comments
Open

[bug] Dynaconf.load_file() no error on missing file(s) #1053

lingfish opened this issue Feb 19, 2024 · 0 comments
Labels

Comments

@lingfish
Copy link

Describe the bug
I'm using click to provide a CLI argument to my program that points Dynaconf to load an alternate config file, as per here. If load_file is supplied a file that is missing, even with silent=False, I'd expect an error/exception to be raised, and it isn't.

To Reproduce
Steps to reproduce the behavior:

settings.load_file(path="/path/to/non_existent_file.toml", silent=False)

Expected behavior
An exception to be raised.

Environment (please complete the following information):

  • OS: Linux/Debian 12
  • Dynaconf 3.2.4

Additional context
I think the issue is around here

paths and local_paths are set to empty, and hence the for loop below never executes, for silent to even be passed to the loader.

@lingfish lingfish added the bug label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant