Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Skip git files during local installation
  • Loading branch information
Tadeusz Sośnierz committed Jan 10, 2013
1 parent fcfec51 commit 84e6bd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/Panda/Fetcher.pm
Expand Up @@ -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}");
Expand Down
3 changes: 2 additions & 1 deletion t/panda/installer.t
Expand Up @@ -3,7 +3,7 @@ use Panda::Installer;
use Panda::Resources;
use Shell::Command;

plan 9;
plan 10;

my $srcdir = 'testmodules';
my $destdir = "{cwd}/removeme";
Expand All @@ -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",
Expand Down

0 comments on commit 84e6bd9

Please sign in to comment.