fix default config loading

This commit is contained in:
Davide Scaini
2026-03-30 15:39:58 +02:00
parent 8fcd9f642b
commit c58bc8f7d5
+9
View File
@@ -43,6 +43,15 @@ def _find_data_dir(explicit: Optional[str], config_path: Optional[str]) -> Path:
if out:
return Path(out).expanduser().resolve()
# Auto-detect: try extract_config.yaml in cwd
auto_config = Path.cwd() / "extract_config.yaml"
if auto_config.exists():
import yaml
raw = yaml.safe_load(auto_config.read_text())
out = raw.get("output", {}).get("dir")
if out:
return Path(out).expanduser().resolve()
# Default: ./bincio_data next to cwd
default = Path.cwd() / "bincio_data"
if default.exists():