From be41db8f0ec3c242d349d0704a225543d32adb71 Mon Sep 17 00:00:00 2001 From: qiulaidongfeng <2645477756@qq.com> Date: Thu, 25 Apr 2024 21:25:35 +0800 Subject: [PATCH] n Change-Id: Ia532697ea429907567ab156f6f50059a15e90fbb --- src/os/exec/exec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/exec/exec.go b/src/os/exec/exec.go index 88eb9a82c22a3c..467bbfabc4ba0b 100644 --- a/src/os/exec/exec.go +++ b/src/os/exec/exec.go @@ -644,7 +644,7 @@ func (c *Cmd) Start() error { } lp := c.Path if runtime.GOOS == "windows" { - if lp == "" { + if c.cacheLookExtensions == "" { // 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 @@ -665,7 +665,7 @@ func (c *Cmd) Start() error { if err != nil { return err } - } else if c.cacheLookExtensions != "" { + } else { lp = c.cacheLookExtensions } }