Skip to content

Commit

Permalink
Update error message when missing required env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
equinor-ruaj authored Oct 16, 2024
1 parent 04d973c commit 2249fec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fmu/sumo/sim2sumo/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ def main():
missing = 0
for envVar in REQUIRED_ENV_VARS:
if environ.get(envVar) is None:
print(f"{envVar} is not set.")
print(f"Required environment variable {envVar} is not set.")
missing += 1

if missing > 0:
print("Missing required environment variables. Stopping.")
print("Required ERT environment variables not found. This can happen if sim2sumo was called outside the ERT context. Stopping.")
exit()

args = parse_args()
Expand Down

0 comments on commit 2249fec

Please sign in to comment.