Closed jdblischak closed 5 years ago
Thanks. This is the offender:
The workaround is to just omit USE_RTOOLS
, but we should really check for true
. Would you like to submit a pull request?
Would it be something like ($env:USE_RTOOLS -is $true)
?
I don't know PowerShell :sweat_smile:
Thanks. This is the offender:
I see. So it is checking to see if the environment variable USE_RTOOLS
is set, but it could be anything.
The workaround is to just omit USE_RTOOLS,
Agreed. That is what I did to quickly fix the problem.
but we should really check for true . Would you like to submit a pull request?
@krlmlr @LiNk-NY I don't know much PowerShell. Here's my guess for a solution. Happy to submit a PR if this looks ok:
$rtools= $env:USE_RTOOLS
if ((Test-Path "src") -or ($rtools -eq "true")) {
InstallRtools
}
Else {
Progress "Skipping download of Rtools because src/ directory is missing."
}
Observed behavior
I had set
USE_RTOOLS: true
so that I could build the latest versions of CRAN packages even when a binary version is not available. However, I recently decided that the added build time wasn't worth getting the latest package versions (compiling stringi was approximately doubling the build time). To make it easy to remember how to turn this back on in the future, I explicitly set the default ofUSE_RTOOLS: false
. Unexpectedly, this caused Rtools to be installed.Expected behavior
I expected setting
USE_RTOOLS: false
to behave the same as the default when nosrc/
directory is present.Examples
USE_RTOOLS: false
USE_RTOOLS