r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
643 stars 56 forks source link

easy to accidentally overwrite a repository when calling `repo_add()` #528

Open idavydov opened 10 months ago

idavydov commented 10 months ago

As far as I understand, the following code: pak::repo_add("foo") is equivalent to pak::repo_add(EXTRA='foo').

This could lead to an unexpected behavior when having something like this:

echo "pak::repo_add('foo1')" >> ~/.Rprofile
echo "pak::repo_add('foo2')" >> ~/.Rprofile
echo "pak::repo_add('foo3')" >> ~/.Rprofile

What do you think about the following solutions:

gaborcsardi commented 10 months ago

It does not seem like a major issue to me, as nothing is lost and it is easy to discover and fix.

I guess we can create a new name if LOCAL (that's the name pak uses AFAICT), is taken: LOCAL1, LOCAL2, etc.