Unsetenv > Setenv "" as the former is unavailable in golang 1.3

master
xSmurf 10 years ago
parent 94f84a0063
commit b72d77b891

@ -33,7 +33,7 @@ func resolveVars(p string, u *user.User) (string, error) {
} }
resolved, err := exec.LookPath(p[len(pathVar):]) resolved, err := exec.LookPath(p[len(pathVar):])
if emptyPath { if emptyPath {
os.Unsetenv("PATH") os.Setenv("PATH", "") // Do not use Unsetenv, incompatible with golang 1.3
} }
if err != nil { if err != nil {
return "", fmt.Errorf("failed to resolve %s", p) return "", fmt.Errorf("failed to resolve %s", p)

Loading…
Cancel
Save