summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-02-04 17:04:28 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-02-04 17:04:28 -0700
commitc1d65f03978ed8c133479ea184dce5e0dc0f8bda (patch)
treed3397daa155214b7a42b295c9b534742d936ffdf
parentcbcf3892e0850bfae538b25808397ef1acbc36cf (diff)
downloadp5-Git-Annex-c1d65f03978ed8c133479ea184dce5e0dc0f8bda.tar.gz
instantiate test Git::Wrapper instances with an absolute path
Prevents various possible failures. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--t/lib/t/Setup.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/lib/t/Setup.pm b/t/lib/t/Setup.pm
index 94c3d7c..db0a9c5 100644
--- a/t/lib/t/Setup.pm
+++ b/t/lib/t/Setup.pm
@@ -8,7 +8,7 @@ use parent 'Exporter';
use File::Slurp;
use File::Temp qw(tempdir);
use Git::Wrapper;
-use File::Spec::Functions qw(catfile);
+use File::Spec::Functions qw(catfile rel2abs);
use File::chdir;
use File::Path qw(rmtree);
@@ -19,7 +19,7 @@ sub with_temp_annexes (&) {
{
local $CWD = $temp;
my ($source1, $source2, $dest)
- = map { Git::Wrapper->new($_) } qw(source1 source2 dest);
+ = map { Git::Wrapper->new(rel2abs $_) } qw(source1 source2 dest);
mkdir for qw(source1 source2 dest);
for ($source1, $source2, $dest) {
$_->init;