From c52a900f13640ba833ca6a40ac062b46f23fa5a9 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 6 Oct 2026 00:37:05 -0700 Subject: [PATCH] test: the CI replay puts git on the step's PATH on native Windows too The replayed steps call git. On Linux os.defpath reaches it; on Windows the replay's PATH only reached it through the located bash's directory, and Git for Windows ships a bash.exe in usr\bin with no git.exe beside it. The Windows arm64 lane resolved that bash and 13 replay cases failed with "git: command not found" (1e547a814c3 had just put them on the native Windows lanes). git's own directory now rides along like bash's. --- tests/ci/workflow_steps.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/ci/workflow_steps.py b/tests/ci/workflow_steps.py index 549575facc..faa2c57e6a 100644 --- a/tests/ci/workflow_steps.py +++ b/tests/ci/workflow_steps.py @@ -64,8 +64,12 @@ def _run(step: dict, ctx: dict, cwd: Path | None = None, *, receipt: bool = Fals output.touch() calls.touch() bash = locate_command("bash").command[0] + # Steps call git too. Linux reaches it through os.defpath; on Windows the bash found + # first may be Git's usr\bin (no git.exe), so git's own dir rides along like bash's. + git = locate_command("git").command[0] env = { - "PATH": os.pathsep.join((*_interpreter_dirs(root), os.defpath, str(Path(bash).parent))), + "PATH": os.pathsep.join((*_interpreter_dirs(root), os.defpath, str(Path(bash).parent), + str(Path(git).parent))), "HOME": directory, "RUNNER_TEMP": directory, "GITHUB_OUTPUT": str(output), "REPLAY_PYTHON": sys.executable, "REPLAY_CALLS": str(calls), **{k: gha.to_string(gha.render(v, ctx)) for k, v in step.get("env", {}).items()},