[carton] 462/472: Don't die if no .meta directories are present.

Lucas Kanashiro kanashiro-guest at moszumanska.debian.org
Fri Jul 24 00:39:37 UTC 2015


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

kanashiro-guest pushed a commit to branch master
in repository carton.

commit 0e49368a159b4118acbcb353060e55160483e37b
Author: Peter Oliver <git at mavit.org.uk>
Date:   Sat May 9 13:23:32 2015 +0100

    Don't die if no .meta directories are present.
    
    Before this change, the following error message was emitted if no `.meta`
    directories were present:
    ```
    invalid top directory at /usr/share/perl5/File/Find.pm line 472.
    ```
    
    After this change, the following error message was emitted instead.  I think
    this is more informative.
    ```
    Couldn't find install metadata for Carton at /usr/local/share/perl5/Carton/Packer.pm line 61.
    ```
---
 lib/Carton/Packer.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/Carton/Packer.pm b/lib/Carton/Packer.pm
index 333aa09..dc1a2cf 100644
--- a/lib/Carton/Packer.pm
+++ b/lib/Carton/Packer.pm
@@ -84,7 +84,9 @@ sub installed_meta {
         }
     };
 
-    File::Find::find({ wanted => $finder, no_chdir => 1 }, grep -d, map "$_/.meta", @INC);
+    my @meta_dirs = grep -d, map "$_/.meta", @INC;
+    File::Find::find({ wanted => $finder, no_chdir => 1 }, @meta_dirs)
+        if @meta_dirs;
 
     # return the latest version
     @meta = sort { version->new($b->version) cmp version->new($a->version) } @meta;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/carton.git



More information about the Pkg-perl-cvs-commits mailing list