Skip to content

Commit

Permalink
Update validate_release.yml
Browse files Browse the repository at this point in the history
Better handling of the file not found error
  • Loading branch information
dmtzs committed Dec 19, 2023
1 parent 863ca53 commit abc51a3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/scripts/validate_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ def load_env_vars() -> None:
- None
"""
try:
load_dotenv("vars.env")
print("\033[92m The vars.env file loaded \033[0m")
if os.path.exists("vars.env"):
load_dotenv("vars.env")
print("\033[92m The vars.env file loaded \033[0m")
else:
raise FileNotFoundError
except FileNotFoundError:
print("\033[33m The vars.env file was not found, using env vars of github action \033[0m")

Expand Down

0 comments on commit abc51a3

Please sign in to comment.