mirror of
https://github.com/jmagar/unraid-mcp.git
synced 2026-03-23 12:39:24 -07:00
refactor(elicitation): use PROJECT_ROOT directly (already a Path)
This commit is contained in:
@@ -8,7 +8,6 @@ them to .env in the server root directory.
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
from fastmcp import Context
|
from fastmcp import Context
|
||||||
|
|
||||||
@@ -60,7 +59,7 @@ def _write_env(api_url: str, api_key: str) -> None:
|
|||||||
|
|
||||||
Preserves any existing lines that are not UNRAID_API_URL or UNRAID_API_KEY.
|
Preserves any existing lines that are not UNRAID_API_URL or UNRAID_API_KEY.
|
||||||
"""
|
"""
|
||||||
env_path = Path(PROJECT_ROOT) / ".env"
|
env_path = PROJECT_ROOT / ".env"
|
||||||
existing_lines: list[str] = []
|
existing_lines: list[str] = []
|
||||||
|
|
||||||
if env_path.exists():
|
if env_path.exists():
|
||||||
|
|||||||
Reference in New Issue
Block a user