From 54df59b6232ce258d1f3172ace54a9c09bd13912 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 7 Apr 2024 19:55:30 +0200 Subject: [PATCH] wrap in try-fetch to see if we can avoid onload error --- R/zzz.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/R/zzz.R b/R/zzz.R index c9b03c603..00e668084 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -17,9 +17,14 @@ ) toset <- !(names(op.styler) %in% names(op)) if (any(toset)) options(op.styler[toset]) - ask_to_switch_to_non_default_cache_root() - remove_cache_old_versions() - remove_old_cache_files() + rlang::try_fetch( + { + ask_to_switch_to_non_default_cache_root() + remove_cache_old_versions() + remove_old_cache_files() + }, + error = function(...) NULL + ) invisible() }