This commit is contained in:
wenfp
2026-07-27 12:37:35 +08:00
parent 5717c651b2
commit 083042479c
+3 -1
View File
@@ -16,7 +16,9 @@ def load_local_env() -> None:
if not line or line.startswith("#") or "=" not in line: if not line or line.startswith("#") or "=" not in line:
continue continue
key, value = line.split("=", 1) key, value = line.split("=", 1)
os.environ.setdefault(key.strip(), value.strip().strip('"').strip("'")) key = key.strip()
if key not in os.environ or os.environ[key] == "":
os.environ[key] = value.strip().strip('"').strip("'")
load_local_env() load_local_env()