chore: env path refactor (#3691)

Co-authored-by: Suchintan <suchintan@users.noreply.github.com>
Co-authored-by: Shuchang Zheng <wintonzheng0325@gmail.com>
This commit is contained in:
greg niemeyer
2025-10-12 10:36:24 -07:00
committed by GitHub
parent 9b2bbda3c8
commit cf9e1c2552
11 changed files with 101 additions and 76 deletions

View File

@@ -1,15 +1,15 @@
from pathlib import Path
from dotenv import load_dotenv, set_key
from rich.panel import Panel
from rich.prompt import Confirm, Prompt
from skyvern.utils.env_paths import resolve_backend_env_path
from .console import console
def update_or_add_env_var(key: str, value: str) -> None:
"""Update or add environment variable in .env file."""
env_path = Path(".env")
env_path = resolve_backend_env_path()
if not env_path.exists():
env_path.touch()
defaults = {