release: v0.9.1-beta7

This commit is contained in:
2026-04-22 00:27:37 +02:00
parent 0fb9a71390
commit 14400dd799
6 changed files with 67 additions and 12 deletions

View File

@@ -3,12 +3,14 @@ env_loader.py lädt Verbindungsparameter aus .env (Repo-Root oder Arbeitsver
Umgebungsvariablen haben Vorrang vor .env-Werten.
"""
import os
import sys
import pathlib
_BASE = pathlib.Path(sys.executable).parent if getattr(sys, "frozen", False) else pathlib.Path(__file__).parent
def _find_env_file() -> pathlib.Path | None:
# Suche .env im selben Verzeichnis, dann im Parent (Repo-Root)
for base in (pathlib.Path(__file__).parent, pathlib.Path(__file__).parent.parent):
for base in (_BASE, _BASE.parent):
p = base / ".env"
if p.is_file():
return p