1
0
Fork 0
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:
Étienne Fildadut 2025-10-09 17:04:39 +02:00
parent ffdb8a98b9
commit 65926978bd

View file

@ -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 = {}