tests/testthat/helper-utils.R

git <- function(...) cliff::run("git", ...)

local_temp_git_repo <- function() {
    repo <- tempfile("repo")
    dir.create(repo, showWarnings = FALSE)
    withr::defer_parent(unlink(repo))
    git("init", wd = repo)
    return(repo)
}

Try the cliff package in your browser

Any scripts or data that you put into this service are public.

cliff documentation built on Nov. 2, 2021, 9:09 a.m.