Merge pull request #615 from jlowin/print-env

Don't print env vars to console when format is wrong
This commit is contained in:
Jeremiah Lowin 2025-05-28 15:46:37 -04:00 committed by GitHub
commit aaad41b577
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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()