diff --git a/scripts/tests/test_release_guards.py b/scripts/tests/test_release_guards.py index 0ace2c87..6cbd9768 100755 --- a/scripts/tests/test_release_guards.py +++ b/scripts/tests/test_release_guards.py @@ -1072,7 +1072,10 @@ def test_validator_dotnet_leg_fails_when_no_report_was_written(self) -> None: verdict = run( ["bash", "-c", script], cwd=work, - env={**os.environ, "PATH": f"{bin_dir}{os.pathsep}{os.environ['PATH']}"}, + env={ + **os.environ, + "PATH": f"{bin_dir}{os.pathsep}{os.environ.get('PATH', os.defpath)}", + }, capture_output=True, text=True, encoding="utf-8",