From 90266465da75b6ccf4179967486c5a4585516204 Mon Sep 17 00:00:00 2001 From: reneeb Date: Mon, 5 Jun 2023 09:13:10 +0200 Subject: [PATCH] do not warn about 'uninitialized value' on non-symlink platforms 'dzil test' warns on some platforms about 'uninitialized value latest'. (see https://github.com/PerlServices/OPM-Maker-Command-depcheck/actions/runs/5146304937/jobs/9265154121#step:7:39) --- lib/Dist/Zilla/Dist/Builder.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Dist/Zilla/Dist/Builder.pm b/lib/Dist/Zilla/Dist/Builder.pm index 15078bc88..a58911b79 100644 --- a/lib/Dist/Zilla/Dist/Builder.pm +++ b/lib/Dist/Zilla/Dist/Builder.pm @@ -779,7 +779,7 @@ sub test { $self->log("all's well; removing $target"); $target->remove_tree({ safe => 0 }); - $latest->remove_tree({ safe => 0 }) if -d $latest; # error cannot unlink, is a directory + $latest->remove_tree({ safe => 0 }) if $latest && -d $latest; # error cannot unlink, is a directory $latest->remove if $latest; }