This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=09b0b3ab99ba197a4fc5abf9363de32b472d9b61

commit 09b0b3ab99ba197a4fc5abf9363de32b472d9b61
Author: Guillem Jover <[email protected]>
AuthorDate: Sat Jan 16 13:34:34 2021 +0100

    Test::Dpkg: Fix test data path fetching on CPAN
    
    There is no guarantee that the perl used will have «.» in INC, so we
    need to add an explicit «./» prefix, which we were already doing for
    the autotools case. Unify the handling for autotools and CPAN, which
    should fix the latter.
---
 scripts/Test/Dpkg.pm | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/scripts/Test/Dpkg.pm b/scripts/Test/Dpkg.pm
index 937f333ba..a30168975 100644
--- a/scripts/Test/Dpkg.pm
+++ b/scripts/Test/Dpkg.pm
@@ -79,12 +79,10 @@ sub test_get_data_path
     my $path = shift;
 
     if (defined $path) {
-        if ($test_mode eq 'cpan') {
-            return $path;
-        } else {
-            my $srcdir = $ENV{srcdir} || '.';
-            return "$srcdir/$path";
-        }
+        my $srcdir;
+        $srcdir = $ENV{srcdir} if $test_mode ne 'cpan';
+        $srcdir ||= '.';
+        return "$srcdir/$path";
     } else {
         return _test_get_caller_dir();
     }

-- 
Dpkg.Org's dpkg

Reply via email to