R/git.R

Defines functions renv_git_preflight git

git <- function() {

  gitpath <- Sys.which("git")
  if (!nzchar(gitpath))
    stop("failed to find git executable on the PATH")

  gitpath

}

renv_git_preflight <- function() {
  if (!nzchar(Sys.which("git")))
    stopf("'git' is not available on the PATH")
}

Try the renv package in your browser

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

renv documentation built on March 25, 2026, 5:07 p.m.