Skip to content
Browse files

Skip git files during local installation

  • Loading branch information...
1 parent fcfec51 commit 84e6bd972a257f08bd727828727a065c3ab59821 @tadzik committed Jan 10, 2013
Showing with 5 additions and 2 deletions.
  1. +3 −1 lib/Panda/Fetcher.pm
  2. +2 −1 t/panda/installer.t
View
4 lib/Panda/Fetcher.pm
@@ -47,7 +47,9 @@ class Panda::Fetcher does Pies::Fetcher {
for find(dir => $url).list {
# that's sort of ugly, I know, but we need
# <source-url> stripped
- my $where = "$dest/{$_.dir.substr($url.chars)}";
+ my $d = $_.dir.substr($url.chars);
+ next if $d ~~ /^ '/'? '.git'/; # skip VCS files
+ my $where = "$dest/$d";
mkpath $where;
next if $_.IO ~~ :d;
$_.IO.copy("$where/{$_.name}");
View
3 t/panda/installer.t
@@ -3,7 +3,7 @@ use Panda::Installer;
use Panda::Resources;
use Shell::Command;
-plan 9;
+plan 10;
my $srcdir = 'testmodules';
my $destdir = "{cwd}/removeme";
@@ -24,6 +24,7 @@ file_exists_ok "$destdir/lib/foo.pir", 'pir installed';
file_exists_ok "$destdir/lib/bar.pod", 'pod installed';
file_exists_ok "$destdir/lib/baz.js", 'random files installed';
file_exists_ok "$destdir/bin/bar", 'bin installed';
+ok "$destdir/.git".IO !~~ :e, 'git files not copied';
file_exists_ok "$destdir/compiled/module/doc/foofile",
'docs installed 1';
file_exists_ok "$destdir/compiled/module/doc/bardir/barfile",

0 comments on commit 84e6bd9

Please sign in to comment.
Something went wrong with that request. Please try again.