@dmitshur requested issue #68314 to be considered for backport to the next 1.22 minor release.

@gopherbot Please backport to Go 1.22. Only Go 1.22 needs the fix, as this isn't an issue in Go 1.2​1.

This is a regression that can cause wrong binaries to be executed on Windows, with no workaround other than changing user code.

Comment From: gopherbot

Change https://go.dev/cl/596976 mentions this issue: [release-branch.go1.22] os/exec: only use cachedLookExtensions if Cmd.Path is unmodified

Comment From: cagedmantis

Approved. This is a regression that can cause wrong binaries to be executed on Windows, with no workaround other than changing user code.

Comment From: gopherbot

Closed by merging ea96074191e2fdd435c7f38ce0283bb868336122 to release-branch.go1.22.