Closed soniamitchell closed 4 years ago
Thanks, that does seem like something we could handle more gracefully. Do you have something in mind for a fix? Is there another package that does this very well which we can look at for inspiration?
Maybe something like this:
if (!dir.exists(path)){
dir.create(path)
} else {
print("Directory already exists!")
}
at line 89 in core_use_compendium.R ?
Thank you, would you like to make a pull request (with a test) to add this?
Describe the bug The function create_compendium("pkgname") doesn't check whether "pkgname" already exists. If pkgname is a folder, the package is merged with an existing folder. If pkgname is a file, an error occurs.
To Reproduce
Expected behavior Check whether 'pkgname' already exists and if it does, stop.