Don't print env vars to console when format is wrong

This commit is contained in:
Jeremiah Lowin 2025-05-28 08:40:22 -04:00
commit 2b547309ec

View file

@ -50,9 +50,7 @@ def _get_npx_command():
def _parse_env_var(env_var: str) -> tuple[str, str]:
"""Parse environment variable string in format KEY=VALUE."""
if "=" not in env_var:
logger.error(
f"Invalid environment variable format: {env_var}. Must be KEY=VALUE"
)
logger.error("Invalid environment variable format. Must be KEY=VALUE")
sys.exit(1)
key, value = env_var.split("=", 1)
return key.strip(), value.strip()