mirror of
https://codeberg.org/Reuh/feather.git
synced 2025-10-27 18:19:32 +00:00
fix: show error when configuration file path explicitely set but not found
This commit is contained in:
parent
ffdb8a98b9
commit
65926978bd
1 changed files with 3 additions and 0 deletions
3
main.py
3
main.py
|
|
@ -21,6 +21,9 @@ class Config:
|
|||
if config_path.exists():
|
||||
with config_path.open("rb") as f:
|
||||
config = tomllib.load(f)
|
||||
elif "CONFIG_PATH" in os.environ:
|
||||
print(f"Configuration file {config_path} does not exist; create it or change the CONFIG_PATH environment variable to another path")
|
||||
exit(1)
|
||||
else:
|
||||
config = {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue