Open mayerbry opened 2 months ago
We're basically doing 2 things here:
remotes::install_git()
is nice when it works because it wraps these into a single step, but I've seen it choke on directory permissions, GitHub credentials, and now the macOS network drive issue. I've had problems myself with this, and I've also helped different SRAs through these problems.
An approach that doesn't require any additional development is just to isolate the cloning from the installing.
git clone
the repo using whatever method you normally usegit checkout
the desired branch.git pull
.Rproj
filedevtools::install()
from the consoleThis doesn't require remotes::install_git()
to correctly figure out your git permissions, directory permissions, or network drives, and doesn't require additional development to work around OS-specific differences. If you can clone it, you can install it.
Note: If there's a need to install a network drive datapackage programmatically from inside a report and across different OS, I guess this doesn't solve that. We could also consider just using visc_load_pdata()
inside a report and doing the actual data package installation manually. If the pdata hash is wrong or the datapackage isn't installed, visc_load_pdata()
throws an informative error.
Two related issues:
install_git
doesn't work with network drives on Macs, because of the parsing of/Volumes/
as the front end of the file pathremotes::install_git("N:/cavd/studies/cvd785/pdata/Ho785.git")
vs.remotes::install_git("/Volumes/cavd/studies/cvd785/pdata/Ho785.git")
Code I had started