From dc3169f2350f61acac5ef7842b7514013abacbe1 Mon Sep 17 00:00:00 2001 From: qiulaidongfeng <2645477756@qq.com> Date: Sat, 1 Jun 2024 08:57:56 +0800 Subject: [PATCH] n Change-Id: Iaaa821da8451bab91e81ea457b3ea6f32ff91823 --- src/os/exec/exec.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/os/exec/exec.go b/src/os/exec/exec.go index 19d4bedfc8..50ed3a8d16 100644 --- a/src/os/exec/exec.go +++ b/src/os/exec/exec.go @@ -440,7 +440,7 @@ func Command(name string, arg ...string) *Cmd { // cmd.Dir may be set after we return from this function and that may cause // the command to resolve to a different extension. lp, err := lookExtensions(name, "") - cmd.cacheLookExtensions = lp + cmd.cachedLookExtensions = lp if err != nil { cmd.Err = err } @@ -642,10 +642,10 @@ func (c *Cmd) Start() error { return c.Err } lp := c.Path - if c.cacheLookExtensions != "" { - lp = c.cacheLookExtensions + if c.cachedLookExtensions != "" { + lp = c.cachedLookExtensions } - if runtime.GOOS == "windows" && c.cacheLookExtensions == "" { + if runtime.GOOS == "windows" && c.cachedLookExtensions == "" { // If c.Path is relative, we had to wait until now // to resolve it in case c.Dir was changed. // (If it is absolute, we already resolved its extension in Command