Remove LD_LIBRARY_PATH before running gdb (#13594)

Suggestion by @peace-maker
This commit is contained in:
Sebastian Rittau
2025-03-08 00:09:47 +01:00
committed by GitHub
parent a91c147f80
commit b4c656a6f7
2 changed files with 3 additions and 3 deletions
-3
View File
@@ -13,6 +13,3 @@ extra_description = """\
[tool.stubtest]
platforms = ["linux"]
apt_dependencies = ["gdb"]
# TODO (2025-03-05): unskip once `gdb` can be installed on `ubuntu-24.04`,
# see https://github.com/python/typeshed/pull/13582
skip = true
+3
View File
@@ -252,6 +252,9 @@ def setup_gdb_stubtest_command(venv_dir: Path, stubtest_cmd: list[str]) -> bool:
import sys
stubtest_env = os.environ | {{"STUBTEST_ARGS": json.dumps(sys.argv)}}
# With LD_LIBRARY_PATH set, some GitHub action runners look in the wrong
# location for gdb, causing stubtest to fail.
stubtest_env.pop("LD_LIBRARY_PATH", None)
gdb_cmd = [
"gdb",
"--quiet",