Skip to content

Commit

Permalink
revised detatch
Browse files Browse the repository at this point in the history
  • Loading branch information
bburns632 committed Apr 23, 2024
1 parent 5e51207 commit 02f979a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/FunctionReporter.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
Expand Down

0 comments on commit 02f979a

Please sign in to comment.