chiark / gitweb /
Test suite: Fix entirely-broken tstunt PERLLIB arrangements
[dgit.git] / tests / tstunt / dpkg-parsechangelog
index ce2d66dcab3c32b26f3578da9c26df57cddcaad9..4d7cdf84fb3ad426e31ab755dfc3e5e69d3fe682 100755 (executable)
@@ -28,9 +28,9 @@ if (@ARGV) {
     my $strip = $0;
     $strip =~ s#/[^/]+$## or die "$0 ?";
     foreach my $k (qw(PATH PERLLIB)) {
-       my @opath = split /\:/, $ENV{$k};
+       my @opath = defined $ENV{$k} ? split /\:/, $ENV{$k} : ();
        my @npath = grep { $_ ne $strip } @opath;
-       @npath != @opath  or die "$0 $k $ENV{$k} ?";
+       @npath != @opath  or die "$0 $k ".($ENV{$k}//"(undef)")." ?";
        $ENV{$k} = join ':', @npath;
     }
     die if $ENV{'DGIT_NO_TSTUNT_CLPARSE'}++;