From 0ca3cddfc2d02681370754d909d64994fb66f20a Mon Sep 17 00:00:00 2001 From: Vincent van Hees Date: Fri, 25 Oct 2024 12:37:56 +0200 Subject: [PATCH] handle no internet connection during .onAttach (same fix as for GGIR issue 1203) --- R/zzz.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/zzz.R b/R/zzz.R index 2bc3de5..23f89c7 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -13,6 +13,7 @@ } pkgs <- available.packages(repos = repos) cran_version <- package_version(pkgs[which(pkgs[,1] == "GGIRread"),"Version"]) + if (length(cran_version) == 0) return() # handle no internet connection local_version <- utils::packageVersion("GGIRread") behind_cran <- cran_version > local_version if (interactive()) {