diff --git a/DESCRIPTION b/DESCRIPTION index e7a4a570..9fac4778 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -19,8 +19,7 @@ Imports: httr, jsonlite, sys, - utils, - withr + utils Suggests: knitr, rmarkdown, diff --git a/R/with_nix.R b/R/with_nix.R index 02f31fc2..d17d7256 100644 --- a/R/with_nix.R +++ b/R/with_nix.R @@ -207,7 +207,7 @@ with_nix <- function(expr, # 1) save all function args onto a temporary folder each with # `` and `value` as serialized objects from RAM --------------------- - temp_dir <- withr::local_tempdir() + temp_dir <- tempdir() serialize_args(args, temp_dir) # cast list of symbols/names and calls to list of strings; this is to prepare diff --git a/dev/flat_rix.Rmd b/dev/flat_rix.Rmd index 0fda4396..fafae199 100644 --- a/dev/flat_rix.Rmd +++ b/dev/flat_rix.Rmd @@ -391,7 +391,7 @@ flag_rpkgs ```{r, tests-rix} testthat::test_that("Snapshot test of rix()", { - path_default_nix <- withr::local_tempdir() + path_default_nix <- tempdir() save_default_nix_test <- function(ide, path_default_nix) { @@ -447,7 +447,7 @@ testthat::test_that("Snapshot test of rix()", { ```{r, tests-add_quarto_to_sys_pkgs} testthat::test_that("Quarto gets added to sys packages", { - path_default_nix <- withr::local_tempdir() + path_default_nix <- tempdir() save_default_nix_test <- function(pkgs, path_default_nix) { diff --git a/dev/flat_rix_init.Rmd b/dev/flat_rix_init.Rmd index 75893feb..345ddbab 100644 --- a/dev/flat_rix_init.Rmd +++ b/dev/flat_rix_init.Rmd @@ -327,7 +327,7 @@ nix_rprofile <- function() { ```{r, tests-rix_init} testthat::test_that("Snapshot test of rix_init()", { - path_env_nix <- withr::local_tempdir() + path_env_nix <- tempdir() save_rix_init_test <- function(path_env_nix) { diff --git a/dev/flat_with_nix.Rmd b/dev/flat_with_nix.Rmd index 25989477..3eaab10e 100644 --- a/dev/flat_with_nix.Rmd +++ b/dev/flat_with_nix.Rmd @@ -216,7 +216,7 @@ with_nix <- function(expr, # 1) save all function args onto a temporary folder each with # `` and `value` as serialized objects from RAM --------------------- - temp_dir <- withr::local_tempdir() + temp_dir <- tempdir() serialize_args(args, temp_dir) # cast list of symbols/names and calls to list of strings; this is to prepare @@ -845,7 +845,7 @@ testthat::test_that("Testing `with_nix()` if Nix is installed", { #skip_on_covr() - path_subshell <- withr::local_tempdir() + path_subshell <- tempdir() rix_init( project_path = path_subshell, @@ -884,7 +884,7 @@ testthat::test_that("Test `with_nix()` if Nix is installed on R 4.2.0", { skip_if_not(nix_shell_available()) - path_subshell <- withr::local_tempdir() + path_subshell <- tempdir() rix_init( project_path = path_subshell, diff --git a/tests/testthat/test-rix.R b/tests/testthat/test-rix.R index e9a685a5..9fb98a55 100644 --- a/tests/testthat/test-rix.R +++ b/tests/testthat/test-rix.R @@ -2,7 +2,7 @@ testthat::test_that("Snapshot test of rix()", { - path_default_nix <- withr::local_tempdir() + path_default_nix <- tempdir() save_default_nix_test <- function(ide, path_default_nix) { @@ -56,7 +56,7 @@ testthat::test_that("Snapshot test of rix()", { testthat::test_that("Quarto gets added to sys packages", { - path_default_nix <- withr::local_tempdir() + path_default_nix <- tempdir() save_default_nix_test <- function(pkgs, path_default_nix) { diff --git a/tests/testthat/test-rix_init.R b/tests/testthat/test-rix_init.R index b891db82..dec0e784 100644 --- a/tests/testthat/test-rix_init.R +++ b/tests/testthat/test-rix_init.R @@ -2,7 +2,7 @@ testthat::test_that("Snapshot test of rix_init()", { - path_env_nix <- withr::local_tempdir() + path_env_nix <- tempdir() save_rix_init_test <- function(path_env_nix) { diff --git a/tests/testthat/test-with_nix.R b/tests/testthat/test-with_nix.R index 77ee3ffc..6d36a438 100644 --- a/tests/testthat/test-with_nix.R +++ b/tests/testthat/test-with_nix.R @@ -8,7 +8,7 @@ testthat::test_that("Testing `with_nix()` if Nix is installed", { #skip_on_covr() - path_subshell <- withr::local_tempdir() + path_subshell <- tempdir() rix_init( project_path = path_subshell, @@ -47,7 +47,7 @@ testthat::test_that("Test `with_nix()` if Nix is installed on R 4.2.0", { skip_if_not(nix_shell_available()) - path_subshell <- withr::local_tempdir() + path_subshell <- tempdir() rix_init( project_path = path_subshell,