r-lib / remotes

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

`install_github` fails when package and repository name differ #721

Closed david-cortes closed 1 year ago

david-cortes commented 1 year ago

Steps to reproduce:

Expected behavior: should install the package correctly, just like doing it through R CMD build and R CMD INSTALL does.

Actual behavior: fails to install the package.

To verify that the example package installs correctly, try the following:

git clone https://github.com/david-cortes/multinomial_probit.git
R CMD build multinomial_probit
R CMD INSTALL multinomial.probit*
gaborcsardi commented 1 year ago

What's the actual error that you see?

david-cortes commented 1 year ago

Oh sorry, just realized it was missing the Makevars in the github repository and was thus being compiled with different arguments by remotes than by R CMD.

gaborcsardi commented 1 year ago

was thus being compiled with different arguments by remotes than by R CMD.

That seems unlikely to me, as your example failed for me with R CMD build/INSTALL as well, the same way as with remotes. Maybe you have a ~/.R/Makevars file.

In any case, I am glad you solved the issue.