Skip to content

Commit 911b8fe

Browse files
committed
Apparently, rmtree was not working.
This is related to #7, but we are adressing #5
1 parent ab4d993 commit 911b8fe

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/Pod/To/Cached.pm6

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,14 @@ method freeze( --> Bool ) {
261261
self.save-index;
262262
}
263263

264+
method rm-cache() {
265+
if $*SPEC ~~ IO::Spec::Win32 {
266+
shell "rmdir /S /Q $.path";
267+
} else {
268+
shell "rm -rf $.path";
269+
}
270+
}
271+
264272
=begin pod
265273
266274
=TITLE Pod::To::Cached

t/020-source.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ $cache .= new( :source( DOC ), :path( REP ));
228228
#--MARKER-- Test 36
229229
is-deeply $cache.hash-files(<Valid Old>), %( 'a-pod-file' => 'Valid', 'pod-file-to-deprecate' => 'Old'), 'hash-files with seq of statuses correct';
230230
# remove rep with old source
231-
rmtree REP;
231+
$cache.rm-cache;
232232
#restore valid source file for later tests.
233233
(DOC ~ '/a-pod-file.pod6').IO.spurt(q:to/POD-CONTENT/);
234234
=begin pod

0 commit comments

Comments
 (0)