diff --git a/dyn_gandi/main.py b/dyn_gandi/main.py index b7a0d68..85472d5 100644 --- a/dyn_gandi/main.py +++ b/dyn_gandi/main.py @@ -13,7 +13,7 @@ def loadSettings(path: str | None) -> dict: Load the settings file. `path` Path to a settings file. - By default the program will look for `$HOME/dyn-gandi/config.json` and then `/etc/dyn-gandi.json`. + By default the program will look for `$HOME/.config/dyn-gandi/config.json` and then `/etc/dyn-gandi.json`. ''' if path is None: @@ -22,6 +22,11 @@ def loadSettings(path: str | None) -> dict: if not os.path.exists(path): path = '/etc/dyn-gandi.json' + if not os.path.exists(path): + print( + f"[ERROR] No config file found at '~/.config/dyn-gandi/config.json' or '/etc/dyn-gandi.json'") + quit() + if not os.path.exists(path): print(f"[ERROR] '{path}' does not exist.") quit()