fix(core): Anchor config.toml path to manual slop root

This fixes an issue where config.toml was erroneously saved to the current working directory (e.g. project dir) rather than the global manual slop directory.
This commit is contained in:
2026-03-08 21:29:54 -04:00
parent 1d18150570
commit 74737ac9c7
3 changed files with 9 additions and 5 deletions

View File

@@ -49,7 +49,8 @@ from typing import Optional
_RESOLVED: dict[str, Path] = {}
def get_config_path() -> Path:
return Path(os.environ.get("SLOP_CONFIG", "config.toml"))
root_dir = Path(__file__).resolve().parent.parent
return Path(os.environ.get("SLOP_CONFIG", root_dir / "config.toml"))
def _resolve_path(env_var: str, config_key: str, default: str) -> Path:
if env_var in os.environ: