fix: fail if env vars are not set

This commit is contained in:
Aravinth Manivannan 2023-09-07 18:43:38 +05:30
parent b0bfe003c9
commit 408100ffcd
Signed by: realaravinth
GPG key ID: F8F50389936984FF

2
run.py
View file

@ -30,6 +30,8 @@ def configure_logger():
def get_env(name) -> str: def get_env(name) -> str:
env = FTEST_AUTH = os.environ.get(name) env = FTEST_AUTH = os.environ.get(name)
logger.info(f"Environment: {name}: {env}") logger.info(f"Environment: {name}: {env}")
if env is None:
raise Exception(f"Please set environment variable {name}. See https://git.batsense.net/ForgeFlux/webfinger-test#environment-variables")
return env return env