pak
pak copied to clipboard
package installation fails if 'pak' loaded but not on library paths
For example:
> library(pak)
> .libPaths(tempdir())
> pak::pkg_install("rlang")
Error:
! error in pak subprocess
Caused by error in `loadNamespace(name)`:
! there is no package called ‘pak’
Type .Last.error to see the more details.
> packageVersion("pak")
[1] '0.5.0.9000'
The issue goes away if I force the remote to be initialized before setting the library paths, e.g.
library(pak)
pak:::remote(identity, list(x = 42))
.libPaths(tempdir())
pak::pkg_install("rlang")