From 762f3944eb83753fe38cc9c474eafa263f3f4b49 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Fri, 8 Dec 2023 17:01:43 -0500 Subject: [PATCH] doc: document os/exec changes on Windows For #61422. Updates #62596. Updates #61493. Change-Id: I5c910f9961da24d90b3618ee53540118db06ff91 Reviewed-on: https://go-review.googlesource.com/c/go/+/548481 Auto-Submit: Bryan Mills Reviewed-by: Alex Brainman Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI --- doc/go1.22.html | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/doc/go1.22.html b/doc/go1.22.html index b363aaf14bf98..bbd71b5893fb1 100644 --- a/doc/go1.22.html +++ b/doc/go1.22.html @@ -650,11 +650,22 @@

Minor changes to the library

os/exec

- TODO: https://go.dev/cl/528037: os/exec: fix edge cases in Windows PATH resolution -

- -

- TODO: https://go.dev/cl/528038: os/exec: avoid calling LookPath in cmd.Start for resolved paths + On Windows, LookPath now + ignores empty entries in %PATH%, and returns + ErrNotFound (instead of ErrNotExist) if + no executable file extension is found to resolve an otherwise-unambiguous + name. +

+ +

+ On Windows, Command and + Cmd.Start no + longer call LookPath if the path to the executable is already + absolute and has an executable file extension. In addition, + Cmd.Start no longer writes the resolved extension back to + the Path field, + so it is now safe to call the String method concurrently + with a call to Start.