if canExec(file) {
return file, nil
}
- return "", os.ENOENT
+ return "", &os.PathError{"lookpath", file, os.ENOENT}
}
pathenv := os.Getenv("PATH")
for _, dir := range strings.Split(pathenv, ":", -1) {
return dir + "/" + file, nil
}
}
- return "", os.ENOENT
+ return "", &os.PathError{"lookpath", file, os.ENOENT}
}
if f, ok := canExec(file, exts); ok {
return f, nil
}
- return ``, os.ENOENT
+ return ``, &os.PathError{"lookpath", file, os.ENOENT}
}
if pathenv := os.Getenv(`PATH`); pathenv == `` {
if f, ok := canExec(`.\`+file, exts); ok {
}
}
}
- return ``, os.ENOENT
+ return ``, &os.PathError{"lookpath", file, os.ENOENT}
}