From 20a3147eb881a7a02aaf9b5b66bbd3034ece6e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=A4chler?= Date: Fri, 20 May 2022 16:04:16 +0200 Subject: [PATCH] specify the default library location since base_pkgs() can "hang" Co-authored-by: Yihui Xie --- NEWS.md | 1 + R/packages.R | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 5551dfa..a69d39e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # CHANGES IN xfun VERSION 0.32 +- Fixed the issue that `xfun::base_pkgs()` could hang R (thanks, @mmaechler, #66). # CHANGES IN xfun VERSION 0.31 diff --git a/R/packages.R b/R/packages.R index df27af6..356ce2e 100644 --- a/R/packages.R +++ b/R/packages.R @@ -344,7 +344,7 @@ news2md = function(package, ..., output = 'NEWS.md', category = TRUE) { #' @export #' @examplesIf interactive() #' xfun::base_pkgs() -base_pkgs = function() rownames(installed.packages(priority = 'base')) +base_pkgs = function() rownames(installed.packages(.Library, priority = 'base')) # update one package (from source by default) pkg_update_one = function(pkg, type = 'source') {