pak icon indicating copy to clipboard operation
pak copied to clipboard

package installation fails if 'pak' loaded but not on library paths

Open kevinushey opened this issue 1 year ago • 0 comments

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")

kevinushey avatar Apr 26 '23 00:04 kevinushey