From c87dae566549012933b5a3b851f9a036844830f4 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Sat, 31 Jan 2015 16:57:24 -0800 Subject: [PATCH] treat GatherDir.root relative to the repository root This makes it possible to perform a build without changing into the root directory first. --- lib/Dist/Zilla/Plugin/GatherDir.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Dist/Zilla/Plugin/GatherDir.pm b/lib/Dist/Zilla/Plugin/GatherDir.pm index 93fa3731a..33b0ce4c0 100644 --- a/lib/Dist/Zilla/Plugin/GatherDir.pm +++ b/lib/Dist/Zilla/Plugin/GatherDir.pm @@ -170,6 +170,7 @@ sub gather_files { my $repo_root = $self->zilla->root; my $root = "" . $self->root; $root =~ s{^~([\\/])}{require File::HomeDir; File::HomeDir::->my_home . $1}e; + $root = path($root)->relative($repo_root)->stringify if path($root)->is_relative; my $prune_regex = qr/\000/; $prune_regex = qr/$prune_regex|$_/