MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / read_env_file

Function read_env_file

start_webui.py:70–80  ·  view source on GitHub ↗
(env_path: Path)

Source from the content-addressed store, hash-verified

68
69
70def read_env_file(env_path: Path) -> dict[str, str]:
71 values: dict[str, str] = {}
72 if not env_path.exists():
73 return values
74 for raw_line in env_path.read_text(encoding="utf-8").splitlines():
75 line = raw_line.strip()
76 if not line or line.startswith("#") or "=" not in line:
77 continue
78 key, value = line.split("=", 1)
79 values[key.strip()] = value.strip().strip('"').strip("'")
80 return values
81
82
83def run_command(command: Iterable[str], *, capture_output: bool = False, check: bool = True) -> subprocess.CompletedProcess[str]:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected