diff options
Diffstat (limited to 'src/os/exec/lp_unix.go')
-rw-r--r-- | src/os/exec/lp_unix.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os/exec/lp_unix.go b/src/os/exec/lp_unix.go index 9833205663..b2b412c96b 100644 --- a/src/os/exec/lp_unix.go +++ b/src/os/exec/lp_unix.go @@ -8,6 +8,7 @@ package exec import ( "errors" + "internal/godebug" "io/fs" "os" "path/filepath" @@ -56,7 +57,7 @@ func LookPath(file string) (string, error) { } 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 |