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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user