Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Move proj_path to a more appropriate place in use_addin #619

Merged
merged 9 commits into from
Mar 6, 2019
6 changes: 3 additions & 3 deletions R/addin.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#'
#' @export
use_addin <- function(addin = "new_addin", open = interactive()) {
addin_dcf_path <- "inst/rstudio/addins.dcf"
addin_dcf_path <- proj_path("inst", "rstudio", "addins.dcf")

if (!file_exists(addin_dcf_path)) {
create_directory("inst/rstudio")
create_directory(proj_path("inst", "rstudio"))
file_create(addin_dcf_path)
ui_done("Creating {ui_path(addin_dcf_path)}")
}
Expand All @@ -24,7 +24,7 @@ use_addin <- function(addin = "new_addin", open = interactive()) {
ui_done("Adding binding to {ui_code(addin)} to addins.dcf.")

if (open) {
edit_file(proj_path(addin_dcf_path))
edit_file(addin_dcf_path)
}

invisible(TRUE)
Expand Down