Skip to content

Commit f0a897f

Browse files
make it work with no cache
1 parent d042b8f commit f0a897f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

R/zzz.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
remind_removing_old_cache <- function() {
2727
if (interactive() && getOption("styler.interactive_ask_remove_old_caches", TRUE)) {
2828
dirs <- list.dirs(R.cache::getCachePath("styler"), recursive = FALSE)
29+
if (length(dirs) < 1) {
30+
return()
31+
}
2932
dirs <- dirs[unname(sapply(dirs, function(x) length(list.files(x)) > 0))]
3033
package_versions <- package_version(basename(dirs), strict = FALSE)
3134
package_versions <- package_versions[!is.na(package_versions)]

0 commit comments

Comments
 (0)