delete "compiled" directories as part of cache reset

pull/127/head
Matthew Butterick 9 years ago
parent 1eb5d0fa92
commit 3cf23f5980

@ -11,10 +11,13 @@
(define+provide (reset-cache [starting-dir (current-project-root)])
(unless (and (path-string? starting-dir) (directory-exists? starting-dir))
(raise-argument-error 'reset-cache "path-string to existing directory" starting-dir))
(for ([path (in-directory starting-dir)]
#:when (and (directory-exists? path)
(equal? (path->string (car (reverse (explode-path path)))) (setup:cache-dir-name))))
(let* ([last (compose1 car reverse)]
[last-path-element (path->string (last (explode-path path)))])
(or (equal? last-path-element (setup:cache-dir-name))
(equal? last-path-element "compiled")))))
(message (format "removing cache directory: ~a" path))
(delete-directory/files path)))

@ -1 +1 @@
1469050761
1469678452

Loading…
Cancel
Save