Search code examples
rdevtoolsr-package

R CMD build temp directory location


When executing R CMD build <packagename>, it each time creates a directory in the temp folder, including log files. If the build fails, I would like to look at this folder and the log files.

Is there a way to (parameter) execute R CMD build so that the temp directory's path is printed to the console? Same problem when using devtools::build() or pkgbuild::pkgbuild(). They did return the path to the tar.gz when the build was successful, but they do not return anything if the build fails.


Solution

  • If all you need are the log files, would the --log option be sufficient?

    R CMD build --log pkgdir