Skip to content

Commit

Permalink
n
Browse files Browse the repository at this point in the history
Change-Id: Iaaa821da8451bab91e81ea457b3ea6f32ff91823
  • Loading branch information
qiulaidongfeng committed Jun 1, 2024
1 parent b7431d6 commit dc3169f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/os/exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit dc3169f

Please sign in to comment.