You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
destdir argument for create_package() and create_project() #1684
create_from_github() includes a destdir argument specifying what directory to copy a project into. It also allows you to set a default destdir with options("usethis.destdir").
create_package() and create_project() currently don't have a destdir argument, meaning the user has to type out the full directory path each time they create a new project. If they had a destdir argument, they could use the same usethis.destdir option and users could ensure that their projects are always created in their chosen directory, whether cloned from GitHub or started from scratch.
If this would be helpful, I'd be happy to work on a PR.
changed the title [-]Feature request: `destdir` argument for `create_package()` and `create_project()`[/-][+]`destdir` argument for `create_package()` and `create_project()`[/+]on Jan 17, 2023
I'm open to the idea, but I don't see how you can do it without breaking existing usage — create_package("foo") currently will create it in a subdirectory, but if we added destdir, it would add in getOption("destdir").
I have contemplated this before and remain positively disposed towards the idea. But yeah it's also not trivial to figure out the interface. Every time I've thought about how I would implement it, I've decided it's easier to just keep doing create_package("~/rrr/whatever").
Activity
[-]Feature request: `destdir` argument for `create_package()` and `create_project()`[/-][+]`destdir` argument for `create_package()` and `create_project()`[/+]hadley commentedon Jan 17, 2023
I'm open to the idea, but I don't see how you can do it without breaking existing usage —
create_package("foo")currently will create it in a subdirectory, but if we addeddestdir, it would add ingetOption("destdir").jennybc commentedon Jan 17, 2023
I have contemplated this before and remain positively disposed towards the idea. But yeah it's also not trivial to figure out the interface. Every time I've thought about how I would implement it, I've decided it's easier to just keep doing
create_package("~/rrr/whatever").