Ensure pacman library folder exists when activating/isolating (R does not auto-create it and resorts to the first existing library location)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Package: Rpacman
|
||||
Type: Package
|
||||
Title: Very simple package manager for R
|
||||
Version: 1.0.5
|
||||
Version: 1.0.6
|
||||
Date: 2022-05-31
|
||||
Authors@R: person("Craig", "Williams", email = "craig@avsdev.uk", role = c("aut", "cre"))
|
||||
URL: https://avsdev.uk/R/Rpacman
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#'
|
||||
#' @export
|
||||
activate <- function(totalIsolation = FALSE) {
|
||||
check_pacman_dir()
|
||||
if (totalIsolation) {
|
||||
environment(.libPaths)$.lib.loc <- c(file.path(getwd(), ".pacman/library"), .Library)
|
||||
} else {
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
#'
|
||||
#' @export
|
||||
isolate <- function() {
|
||||
check_pacman_dir()
|
||||
environment(.libPaths)$.lib.loc <- c(file.path(getwd(), ".pacman/library"), .Library)
|
||||
}
|
||||
Reference in New Issue
Block a user