Skip to content

Commit

Permalink
Apparently, rmtree was not working.
Browse files Browse the repository at this point in the history
This is related to #7, but we are adressing #5
  • Loading branch information
JJ committed Sep 4, 2019
1 parent ab4d993 commit 911b8fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/Pod/To/Cached.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ method freeze( --> Bool ) {
self.save-index;
}

method rm-cache() {
if $*SPEC ~~ IO::Spec::Win32 {
shell "rmdir /S /Q $.path";
} else {
shell "rm -rf $.path";
}
}

=begin pod
=TITLE Pod::To::Cached
Expand Down
2 changes: 1 addition & 1 deletion t/020-source.t
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ $cache .= new( :source( DOC ), :path( REP ));
#--MARKER-- Test 36
is-deeply $cache.hash-files(<Valid Old>), %( 'a-pod-file' => 'Valid', 'pod-file-to-deprecate' => 'Old'), 'hash-files with seq of statuses correct';
# remove rep with old source
rmtree REP;
$cache.rm-cache;
#restore valid source file for later tests.
(DOC ~ '/a-pod-file.pod6').IO.spurt(q:to/POD-CONTENT/);
=begin pod
Expand Down

0 comments on commit 911b8fe

Please sign in to comment.