From d50e13b2107414261f11ca6ad5203f16f83e6279 Mon Sep 17 00:00:00 2001 From: freesource Date: Sun, 18 Nov 2001 07:11:11 +0000 Subject: [PATCH] This provides proper output when the path has been changed, basically, if it is the same thing again, it won't be listed. --- BootRoot/YardBox.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/BootRoot/YardBox.pm b/BootRoot/YardBox.pm index 1cfce2f..62c8cbd 100644 --- a/BootRoot/YardBox.pm +++ b/BootRoot/YardBox.pm @@ -1837,8 +1837,18 @@ sub path { my @pathlist = split(':', $ENV{'PATH'}); @main::additional_dirs = split(/:|\s+|,/,$entry[3]); + my @additional_dirs; + + # Check to see if this path doesn't already exist. + foreach my $alt_path ( @main::additional_dirs ) { + my $add_path = grep(/$alt_path/,$ENV{'PATH'}); + if ($add_path == 0) { + push(@additional_dirs, $alt_path); + } + } + info(1, "Search path is now:\n", - join(" ", @main::additional_dirs), " ", + join(" ", @additional_dirs), " ", join(" ", @pathlist), "\n"); } } );