File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -333,9 +333,9 @@ type Cmd struct {
333
333
// and https://go.dev/issue/43724 for more context.
334
334
lookPathErr error
335
335
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
339
339
}
340
340
341
341
// A ctxResult reports the result of watching the Context associated with a
@@ -434,8 +434,7 @@ func Command(name string, arg ...string) *Cmd {
434
434
// We may need to add a filename extension from PATHEXT
435
435
// or verify an extension that is already present.
436
436
// 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.
439
438
//
440
439
// Note that we cannot add an extension here for relative paths, because
441
440
// cmd.Dir may be set after we return from this function and that may cause
You can’t perform that action at this time.
0 commit comments