diff options
Diffstat (limited to 'debianutils/which.c')
-rw-r--r-- | debianutils/which.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/debianutils/which.c b/debianutils/which.c index a715a26..79b2a4f 100644 --- a/debianutils/which.c +++ b/debianutils/which.c @@ -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, '/')) { |