Skip to content

Commit

Permalink
Remove manually prefixed dot in config-filename
Browse files Browse the repository at this point in the history
  • Loading branch information
hmpf committed Oct 16, 2023
1 parent 6b1ddec commit 4da65c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/zinolib/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ def find_config_file(filename):
"""
Look for filename in CONFIG_DIRECTORIES in order
Looks for filenames both with and without a prefixed dot.
If the file isn't found in any of them, raise FileNotFoundError
"""
tried = []
if filename.startswith('.'):
filename = filename[1:]

Check warning on line 22 in src/zinolib/config/utils.py

View check run for this annotation

Codecov / codecov/patch

src/zinolib/config/utils.py#L22

Added line #L22 was not covered by tests
for directory in CONFIG_DIRECTORIES:
if directory in INVISIBLE_LOCATIONS:
used_filename = f'.{filename}'
Expand Down

0 comments on commit 4da65c2

Please sign in to comment.