diff --git a/R/FunctionReporter.R b/R/FunctionReporter.R index fe9d952..3687ba2 100644 --- a/R/FunctionReporter.R +++ b/R/FunctionReporter.R @@ -153,7 +153,7 @@ FunctionReporter <- R6::R6Class( # workaround for covr conflict with loaded packages on windows if(.Platform$OS.type == "windows") { - detach(self$pkg_name, unload = TRUE) + detach(paste0('package:',self$pkg_name), unload = TRUE) } pkgCovDT <- data.table::as.data.table(covr::package_coverage( @@ -166,7 +166,7 @@ FunctionReporter <- R6::R6Class( # workaround for covr conflict with loaded packages on windows if(.Platform$OS.type == "unix") { - loadNamespace(self$pkg_name) + loadNamespace(paste0('package:',self$pkg_name)) } pkgCovDT <- pkgCovDT[, .(coveredLines = sum(value > 0)