Skip to content

Commit 54df59b

Browse files
wrap in try-fetch to see if we can avoid onload error
1 parent fd5b4ab commit 54df59b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

R/zzz.R

+8-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@
1717
)
1818
toset <- !(names(op.styler) %in% names(op))
1919
if (any(toset)) options(op.styler[toset])
20-
ask_to_switch_to_non_default_cache_root()
21-
remove_cache_old_versions()
22-
remove_old_cache_files()
20+
rlang::try_fetch(
21+
{
22+
ask_to_switch_to_non_default_cache_root()
23+
remove_cache_old_versions()
24+
remove_old_cache_files()
25+
},
26+
error = function(...) NULL
27+
)
2328
invisible()
2429
}
2530

0 commit comments

Comments
 (0)