fix which-uses-default-path

This commit is contained in:
Denis Vlasenko 2007-01-28 15:31:19 +00:00
parent 4e1715f4b9
commit 9d938732d0

View File

@ -21,6 +21,10 @@ int which_main(int argc, char **argv)
bb_show_usage();
}
if (!getenv("PATH")) {
setenv("PATH", "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin", 1);
}
while (--argc > 0) {
argv++;
if (strchr(*argv, '/')) {