From 8f0f9ee92bf54ec600a014b12fe619a0a1dcb333 Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:27:24 -0600 Subject: [PATCH] Update pull-request.py --- pull-request.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pull-request.py b/pull-request.py index 7a768b7..eee640e 100755 --- a/pull-request.py +++ b/pull-request.py @@ -78,6 +78,9 @@ def set_env_and_output(name, value): """ for env_var in ("GITHUB_ENV", "GITHUB_OUTPUT"): environment_file_path = os.environ.get(env_var) + if not environment_file_path: + print(f"Warning: {env_var} is unset, skipping.") + continue print("Writing %s=%s to %s" % (name, value, env_var)) with open(environment_file_path, "a") as environment_file: