r-lib / remotes

Install R packages from GitHub, GitLab, Bitbucket, git, svn repositories, URLs
https://remotes.r-lib.org/
Other
331 stars 152 forks source link

git_remote removes beginning forward slash resulting in install_git not finding repos on macOS #686

Open wfulp opened 2 years ago

wfulp commented 2 years ago

I can no longer install repos that are on our network drives through macOS. I believe this issue is a result of the change in #658. This issue only popped up in version 2.4.2. I can work around the issue by first setting the working directory to the repo location.

url <- "/Volumes/networks/projects/project.git/"
remotes:::git_remote(url)$url
[1] "Volumes/networks/projects/project.git/"

remotes::install_git(url)
Error: Failed to install 'unknown package' from Git:
  Error in 'git2r_remote_ls': unsupported URL protocol

##Works##
setwd(url)
remotes::install_git(".")