benmarwick / rrtools

rrtools: Tools for Writing Reproducible Research in R
Other
670 stars 85 forks source link

rrtools::use_analysis(location = "vignettes") function fails to set up compendiumn #81

Closed ntrlshrp closed 5 years ago

ntrlshrp commented 5 years ago

Expected behavior:

devtools::install_github("benmarwick/rrtools")
rrtools::use_compendium("rrtoolsTEST")
rrtools::use_analysis(location = "vignettes")

Actual behavior:

rrtools::use_analysis(location = "vignettes")
✔ Adding bookdown to Imports
✔ Creating 'vignettes' directory and contents
✔ Creating 'vignettes'
✔ Creating 'vignettes/paper'
✔ Creating 'vignettes/figures'
✔ Creating 'vignettes/templates'
✔ Creating 'vignettes/data'
✔ Creating 'vignettes/data/raw_data'
✔ Creating 'vignettes/data/derived_data'
✔ Creating 'references.bib' from template.
Error in usethis::ui_done("Adding ", paths, " to ", file.path(directory,  : 
  unused arguments (" to ", file.path(directory, ".gitignore"))

It seems like a simple fix to update line 210 in R/infrastructure-git.R:

usethis::ui_done("Adding ", paths, " to ", file.path(directory, ".gitignore"))
ntrlshrp commented 5 years ago

This fix to use_git_ignore() revealed some path errors further down in use_vignette_rmd(). I've attempted to fix these as well (see pull request).