diff options
Diffstat (limited to 'src/os/exec/lp_plan9.go')
-rw-r--r-- | src/os/exec/lp_plan9.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os/exec/lp_plan9.go b/src/os/exec/lp_plan9.go index 68224814d1..092684f03a 100644 --- a/src/os/exec/lp_plan9.go +++ b/src/os/exec/lp_plan9.go @@ -6,6 +6,7 @@ package exec import ( "errors" + "internal/godebug" "io/fs" "os" "path/filepath" @@ -53,7 +54,7 @@ func LookPath(file string) (string, error) { for _, dir := range filepath.SplitList(path) { path := filepath.Join(dir, file) if err := findExecutable(path); err == nil { - if !filepath.IsAbs(path) { + if !filepath.IsAbs(path) && godebug.Get("execerrdot") != "0" { return path, &Error{file, ErrDot} } return path, nil |