Skip to content

Commit

Permalink
Normalize install_path before creating dir (#593)
Browse files Browse the repository at this point in the history
* Normalzie install_path before creating dir

* Update R/covr.R

Co-authored-by: Jim Hester <[email protected]>

* Update NEWS.md

Co-authored-by: Jim Hester <[email protected]>

---------

Co-authored-by: Jim Hester <[email protected]>
  • Loading branch information
maksymiuks and jimhester authored Jan 8, 2025
1 parent 57f9fc8 commit 26224e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Encoding: UTF-8
Package: covr
Title: Test Coverage for Packages
Version: 3.6.4.9003
Version: 3.6.4.9004
Authors@R: c(
person("Jim", "Hester", email = "[email protected]", role = c("aut", "cre")),
person("Willem", "Ligtenberg", role = "ctb"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

* Added support for `klmr/box` modules. This works best with `file_coverage()`. (@radbasa, #491)

* Normalize `install_path` path before creating directory to prevent
failures when running covr in a subprocess using a path with Windows
`\\` path separators. (@maksymiuks, #592)

# covr 3.6.4

* Fix for a failing test on CRAN
Expand Down
2 changes: 1 addition & 1 deletion R/covr.R
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ package_coverage <- function(path = ".",
root <- NULL
}

dir.create(install_path)
# tools::testInstalledPackage requires normalized install_path (#517)
install_path <- normalize_path(install_path)
dir.create(install_path)

flags <- getOption("covr.flags")

Expand Down

0 comments on commit 26224e3

Please sign in to comment.