Skip to content

Commit b7431d6

Browse files
n
Change-Id: Ibeb7ff0def24354435a3784dceb22245463a21f1
1 parent 197d6e4 commit b7431d6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/os/exec/exec.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ type Cmd struct {
333333
// and https://go.dev/issue/43724 for more context.
334334
lookPathErr error
335335

336-
// cacheLookExtensions cache the result of calling lookExtensions,
337-
// set it only on windows.
338-
cacheLookExtensions string
336+
// cachedLookExtensions caches the result of calling lookExtensions.
337+
// This is only used on Windows.
338+
cachedLookExtensions string
339339
}
340340

341341
// A ctxResult reports the result of watching the Context associated with a
@@ -434,8 +434,7 @@ func Command(name string, arg ...string) *Cmd {
434434
// We may need to add a filename extension from PATHEXT
435435
// or verify an extension that is already present.
436436
// Since the path is absolute, its extension should be unambiguous
437-
// and independent of cmd.Dir, and we can go ahead and update cmd.Path to
438-
// reflect it.
437+
// and independent of cmd.Dir, and we can go ahead and cache the lookup now.
439438
//
440439
// Note that we cannot add an extension here for relative paths, because
441440
// cmd.Dir may be set after we return from this function and that may cause

0 commit comments

Comments
 (0)