r-lib / pkgbuild

Find tools needed to build R packages
https://pkgbuild.r-lib.org
Other
66 stars 35 forks source link

Don't copy mode to temp file #188

Open MichaelChirico opened 3 months ago

MichaelChirico commented 3 months ago

We run tests where the package directory lacks write permissions, but tempdir() is fine. Copying to tempdir() while maintaining the original permissions partially defeats the purpose.

This is a broader problem that mainly appears to affects us (I don't know of any CRAN policy about assuming write permissions in the test directory), but the fix here is simple enough that I'm offering this PR.

Feel free to reject if you'd rather not worry about this and we'll just keep a patch.