]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.22] os/exec: on Windows look for extensions in Run if not already...
authorqiulaidongfeng <2645477756@qq.com>
Wed, 5 Jun 2024 19:06:31 +0000 (19:06 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 24 Jun 2024 20:39:41 +0000 (20:39 +0000)
commitdfe4dbf8c055f79758ce7ae3d3ab2d0e4a0ea9ee
tree1b269570387ff8b539714812584a8cb4980ebbf7
parent3560cf0afb3c29300a6c88ccd98256949ca7a6f6
[release-branch.go1.22] os/exec: on Windows look for extensions in Run if not already done

CL 512155 fixed #36768, but introduced #62596.
CL 527820 fixed #62596, but meant that the code failed to look up
file extensions on Windows for a relative path.
This CL fixes that problem by recording whether it has already
looked up file extensions.
This does mean that if Path is set manually then we do not update
it with file extensions, as doing that would be racy.

For #66586
Fixes #66598

Change-Id: I9a0305d1e466c5e07bfbe442566ea12f5255a96e
GitHub-Last-Rev: dc3169f2350f61acac5ef7842b7514013abacbe1
GitHub-Pull-Request: golang/go#67035
Reviewed-on: https://go-review.googlesource.com/c/go/+/581695
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
(cherry picked from commit 5532427c4b1c5e962ad5484258be0071bd270e53)
Reviewed-on: https://go-review.googlesource.com/c/go/+/594495
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
src/os/exec/exec.go
src/os/exec/exec_test.go