From 9d938732d0e613d97e59e37f8c251f945e0350ae Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 28 Jan 2007 15:31:19 +0000 Subject: fix which-uses-default-path --- debianutils/which.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debianutils/which.c b/debianutils/which.c index a715a2664..79b2a4f83 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, '/')) { -- cgit v1.2.3