Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install_path parameter breaks in WINDOWS subprocesses #592

Closed
maksymiuks opened this issue Jan 7, 2025 · 0 comments · Fixed by #593
Closed

install_path parameter breaks in WINDOWS subprocesses #592

maksymiuks opened this issue Jan 7, 2025 · 0 comments · Fixed by #593

Comments

@maksymiuks
Copy link
Contributor

When running the covr in the callr subprocess on Windows, covr::package_coverage unexpectedly breaks if install_path has double backslashes (valid WINDOWS path) \\ instead of the single forward slashes /. That's due to the path normalization which happens after creating the directory:

covr/R/covr.R

Lines 413 to 415 in ca4241d

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

Swapping these two lines will make the internal normalize_path function first replace all the \\ with / so the function can proceed as expected. I'm not sure why exactly this is an issue in a subprocess, but the change looks reasonable either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant