aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/os/exec/lp_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/os/exec/lp_unix.go')
-rw-r--r--libgo/go/os/exec/lp_unix.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libgo/go/os/exec/lp_unix.go b/libgo/go/os/exec/lp_unix.go
index 2163221..1d1ec07 100644
--- a/libgo/go/os/exec/lp_unix.go
+++ b/libgo/go/os/exec/lp_unix.go
@@ -42,6 +42,9 @@ func LookPath(file string) (string, error) {
return "", &Error{file, err}
}
pathenv := os.Getenv("PATH")
+ if pathenv == "" {
+ return "", &Error{file, ErrNotFound}
+ }
for _, dir := range strings.Split(pathenv, ":") {
if dir == "" {
// Unix shell semantics: path element "" means "."