diff options
Diffstat (limited to 'src/pkg/exec')
| -rw-r--r-- | src/pkg/exec/exec.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/pkg/exec/exec.go b/src/pkg/exec/exec.go index 7ddb98b508..a50f9dc13a 100644 --- a/src/pkg/exec/exec.go +++ b/src/pkg/exec/exec.go @@ -208,12 +208,7 @@ func LookPath(file string) (string, os.Error) { } return "", os.ENOENT; } - pathenv, err := os.Getenv("PATH"); - if err != nil { - // Unix shell semantics: no $PATH means assume PATH="" - // (equivalent to PATH="."). - pathenv = ""; - } + pathenv := os.Getenv("PATH"); for i, dir := range strings.Split(pathenv, ":", 0) { if dir == "" { // Unix shell semantics: path element "" means "." |
