benmarwick / rrtools

rrtools: Tools for Writing Reproducible Research in R
Other
668 stars 84 forks source link

`create_compendium()` does not "move us into the new project" #133

Closed ntrlshrp closed 3 years ago

ntrlshrp commented 3 years ago

Please wait for some discussion of your report before making a Pull Request.

Describe the bug create_compendium("/home/UserName/DeleteThisRrtoolsPackage") from GitHub (d091ec1) does one of two things:

Error: Path '/home/UserName/' does not appear to be inside a project or package.
In addition: Warning message:
In path_file(base_path) : restarting interrupted promise evaluation

I think this stems from rrtools/R/core_create_compendium.R lines 21-22, where setwd(pkgname) is commented:

  # move us into the new project
  # setwd(pkgname)

To Reproduce

Expected behavior rrtools::create_compendium() should put all rrtools template files into the new rrtools package directory and leave the starting directory untouched.

nevrome commented 3 years ago

Good spotting! Thanks for reporting this.

@benmarwick Why did you comment setwd(pkgname) in 3ba7334d52709597d44586f0c374d6f9b0a45eae? Was this on purpose?