rmarkdown
rmarkdown copied to clipboard
file.path("", "../path/file") and intermediates_dir make Rmarkdown create <intermediates_dir>/../path/file
Checklist
When filing a bug report, please check the boxes below to confirm that you have provided us with the information we need. Have you:
-
[ ] formatted your issue so it is easier for us to read?
-
[ ] included a minimal, self-contained, and reproducible example?
-
[ ] pasted the output from
xfun::session_info('rmarkdown')
in your issue? -
[ ] upgraded all your packages to their latest versions (including your versions of R, the RStudio IDE, and relevant R packages)?
-
[ ] installed and tested your bug with the development version of the rmarkdown package using
remotes::install_github("rstudio/rmarkdown")
?
My rmd file is
pythonpath <- file.path("", "../py312/bin/python3.12")
rmarkdown::render(input = "rmdbug.Rmd", intermediates_dir = "/home/user")
When I excute it, R report the error: Warning messages: 1: In dir.create(dirname(dest), recursive = TRUE) : cannot create dir '/home/user/../py312', reason 'Permission denied' 2: In file.create(to[okay]) : cannot create file '/home/user/../py312/bin/python3.12', reason 'No such file or directory'
Seems that use "../" ("../py312/bin/python3.12") in file.path with intermediates_dir confuse Rmarkdown. This error disappears when I remove the option intermediates_dir = "/home/user" or when I remove "../" from "../py312/bin/python3.12" in file.path