From 1b3de7c21dc46b0a83a8a133fad024e9976a7b60 Mon Sep 17 00:00:00 2001 From: LiNk-NY Date: Tue, 18 Feb 2025 19:26:52 -0500 Subject: [PATCH] suppress warning when package is not installed for .hasPkg --- R/checks.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/checks.R b/R/checks.R index 3f5c389..40355ee 100644 --- a/R/checks.R +++ b/R/checks.R @@ -69,7 +69,11 @@ checkPackageSize <- function(.BiocPackage, size=5){ .in_data <- function(f) { f %in% .DATA_DIRS } -.hasPkg <- function(pkg) nzchar(system.file(package = pkg)) +.hasPkg <- function(pkg) { + suppressWarnings({ + nzchar(system.file(package = pkg)) + }) +} .findLargeFiles <- function(.BiocPackage, data_only) { pkgdir <- .BiocPackage$sourceDir