diff --git a/cista/config.py b/cista/config.py index 823451d..bb906bb 100644 --- a/cista/config.py +++ b/cista/config.py @@ -34,7 +34,7 @@ class Link(msgspec.Struct, omit_defaults=True): config = None -conffile = os.environ.get("CISTA_HOME") or Path.home() / ".local/share/cista/db.toml" +conffile = None def derived_secret(*params, len=8) -> bytes: @@ -120,7 +120,10 @@ def modifies_config(modify): def load_config(): - global config + global config, conffile + conffile = ( + Path(os.environ.get("CISTA_HOME")) or Path.home() / ".local/share/cista/db.toml" + ) config = msgspec.toml.decode(conffile.read_bytes(), type=Config, dec_hook=dec_hook)