Skip to content

Commit

Permalink
wrap in try-fetch to see if we can avoid onload error
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzwalthert committed Apr 7, 2024
1 parent fd5b4ab commit 54df59b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit 54df59b

Please sign in to comment.