r-lib / remotes

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

Parsing remote with github:: prefix #565

Closed jeroen closed 3 years ago

jeroen commented 3 years ago

I was expecting github::statnet/rle@master and statnet/rle@master to be interchangable, but I found that:

remotes::parse_repo_spec('github::statnet/rle@master')

Results in:

$username
[1] "github::statnet"

Which is of course not a valid GitHub name, and hence broke things downstream.

jimhester commented 3 years ago

You need to use remotes:::parse_one_extra("github::statnet/rle@master") to parse the full remote.

muschellij2 commented 3 years ago

Any thoughts on exporting this function for package use? I'm adding a PR to https://github.com/o2r-project/containerit, which is trying to parse remotes and using remotes:::parse_one_extra, but violates CRAN policy.