summaryrefslogtreecommitdiff
path: root/src/sailfish_devel_mcp/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sailfish_devel_mcp/config.py')
-rw-r--r--src/sailfish_devel_mcp/config.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sailfish_devel_mcp/config.py b/src/sailfish_devel_mcp/config.py
index 6515918..73740d1 100644
--- a/src/sailfish_devel_mcp/config.py
+++ b/src/sailfish_devel_mcp/config.py
@@ -39,6 +39,7 @@ class DeviceConfig:
@dataclass(frozen=True)
class PathConfig:
git_root: Path = Path.home() / "git"
+ obs_root: Path = Path.home() / "OBS"
ssh_config: Path = Path.home() / ".ssh" / "config"
build_sailfishos: Path = BUNDLED_BUILD_HELPER
local_sdk: Path | None = None
@@ -47,6 +48,7 @@ class PathConfig:
def public_dict(self) -> dict[str, str | None]:
return {
"git_root": str(self.git_root),
+ "obs_root": str(self.obs_root),
"ssh_config": str(self.ssh_config),
"build_sailfishos": str(self.build_sailfishos),
"local_sdk": str(self.local_sdk) if self.local_sdk else None,
@@ -155,6 +157,13 @@ def _load_paths(raw_paths: Any) -> PathConfig:
or defaults.git_root
)
).expanduser(),
+ obs_root=Path(
+ str(
+ raw_paths.get("obs_root")
+ or os.environ.get("SAILFISH_MCP_OBS_ROOT")
+ or defaults.obs_root
+ )
+ ).expanduser(),
ssh_config=Path(
str(
raw_paths.get("ssh_config")