From 37f9798469b1240c131a83086986b7494b627e2a Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 14 Nov 2004 22:54:11 +0000 Subject: Handle empty PATH too --- Echolot/Config.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Echolot') diff --git a/Echolot/Config.pm b/Echolot/Config.pm index 5ef4fda..547d812 100644 --- a/Echolot/Config.pm +++ b/Echolot/Config.pm @@ -316,9 +316,11 @@ sub check_binaries() { unless -x $path; } else { my $found = 0; - for my $pathelem (split /:/, $ENV{'PATH'}) { - $found = $pathelem, last - if -e $pathelem.'/'.$path; + if (defined $ENV{'PATH'}) { + for my $pathelem (split /:/, $ENV{'PATH'}) { + $found = $pathelem, last + if -e $pathelem.'/'.$path; + }; }; if ($found) { Echolot::Log::warn ("$bin binary $found/$path is not executeable") -- cgit v1.2.3