summaryrefslogtreecommitdiff
path: root/src/pkg/exec/lp_unix.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-08-03 16:54:35 +0200
committerOndřej Surý <ondrej@sury.org>2011-08-03 16:54:35 +0200
commite390fedde07591d46022b7da5692af3fc2e782c6 (patch)
treeaf2eb5968edb6324ba4d6d5cbd623daddb57edda /src/pkg/exec/lp_unix.go
parent041b8f207274852d514bcfa6e5941eefe61e9f60 (diff)
parent28592ee1ea1f5cdffcf85472f9de0285d928cf12 (diff)
downloadgolang-e390fedde07591d46022b7da5692af3fc2e782c6.tar.gz
Merge commit 'upstream/59' into debian-sid
Diffstat (limited to 'src/pkg/exec/lp_unix.go')
-rw-r--r--src/pkg/exec/lp_unix.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/exec/lp_unix.go b/src/pkg/exec/lp_unix.go
index 3fc3be832..008fb11a8 100644
--- a/src/pkg/exec/lp_unix.go
+++ b/src/pkg/exec/lp_unix.go
@@ -10,7 +10,7 @@ import (
)
// ErrNotFound is the error resulting if a path search failed to find an executable file.
-var ErrNotFound = os.ErrorString("executable file not found in $PATH")
+var ErrNotFound = os.NewError("executable file not found in $PATH")
func findExecutable(file string) os.Error {
d, err := os.Stat(file)
@@ -39,7 +39,7 @@ func LookPath(file string) (string, os.Error) {
return "", &Error{file, err}
}
pathenv := os.Getenv("PATH")
- for _, dir := range strings.Split(pathenv, ":", -1) {
+ for _, dir := range strings.Split(pathenv, ":") {
if dir == "" {
// Unix shell semantics: path element "" means "."
dir = "."