Original GitHub issue: usethis cannot find path with accents. · Issue #1630 · r-lib/usethis · GitHub
In R 4.2.0, the following works in a path containing an accent:
usethis::create_package("D:/é/mypkg")
usethis::use_package_doc()
devtools::document(roclets = c('rd', 'collate', 'namespace'))
devtools::check()
also works in the console, but NOT when using the Ctr+Shift+E
shortcut, or using RStudio's Check
button:
getwd()
"D:/é/mypkg"
devtools::check()
[...]
checking R files for syntax errors ... ERROR
Error in file 'R/mypkg-package.R':
cannot open the connection
Warning in file 'R/mypkg-package.R':
cannot open file 'D:/C)/mypkg.Rcheck/00_pkg_src/mypkg/R/mypkg-package.R': No such file or directory
checking examples ... ERROR
Running massageExamples to create 'mypkg-Ex.R' failed
Error in find.package(package, lib.loc) :
there is no package called 'mypkg'
Calls: <Anonymous> -> Rd_db -> find.package
Execution halted
NONE
Seems like the accent "é" is being replaced with letter "C" in the path. I've tried restarting Rstudio and my computer, to no avail. Recommendation on GitHub issue was to come here. Can anyone replicate?