diff --git a/src/os/os_test.go b/src/os/os_test.go index dbe4ff8830..c807786310 100644 --- a/src/os/os_test.go +++ b/src/os/os_test.go @@ -1014,9 +1014,14 @@ func TestStartProcess(t *testing.T) { dir = Getenv("SystemRoot") args = []string{"/c", "cd"} default: - cmd = "/bin/pwd" + var err error + cmd, err = osexec.LookPath("pwd") + if err != nil { + t.Fatalf("Can't find pwd: %v", err) + } dir = "/" args = []string{} + t.Logf("Testing with %v", cmd) } cmddir, cmdbase := filepath.Split(cmd) args = append([]string{cmdbase}, args...)