Skip to content

Commit f9ace65

Browse files
n
Change-Id: If135e6103cc0fac40a3724e2ba43a72f48c5fc9f
1 parent 44f0084 commit f9ace65

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

src/os/exec/exec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ func (c *Cmd) Start() error {
643643
return c.Err
644644
}
645645
lp := c.Path
646-
if c.cacheLookExtensions == "" {
646+
if c.cacheLookExtensions != "" {
647647
lp = c.cacheLookExtensions
648648
}
649649
if runtime.GOOS == "windows" && c.cacheLookExtensions == "" {

src/os/exec/exec_windows_test.go

-14
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"io"
1313
"os"
1414
"os/exec"
15-
"path/filepath"
1615
"strconv"
1716
"strings"
1817
"syscall"
@@ -108,16 +107,3 @@ func TestChildCriticalEnv(t *testing.T) {
108107
t.Error("no SYSTEMROOT found")
109108
}
110109
}
111-
112-
func TestIssue66586(t *testing.T) {
113-
testenv.MustHaveGoBuild(t)
114-
path := filepath.Join(testenv.GOROOT(t), "bin", "go")
115-
cmd := exec.Cmd{Path: path, Args: []string{path, "version"}}
116-
err := cmd.Run()
117-
if err != nil {
118-
t.Fatal(err)
119-
}
120-
if path != cmd.Path {
121-
t.Fatalf("unexpected path: %s", cmd.Path)
122-
}
123-
}

0 commit comments

Comments
 (0)