Skip to content

Commit

Permalink
handles empty string for package name in write_bib()
Browse files Browse the repository at this point in the history
closes #2240
  • Loading branch information
cderv committed Mar 13, 2023
1 parent 25b681d commit 7e0d4f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/citation.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ write_bib = function(
) {
system.file = function(...) base::system.file(..., lib.loc = lib.loc)
citation = function(...) utils::citation(..., lib.loc = lib.loc)
x = x[nzchar(x)] # remove possible empty string
idx = mapply(system.file, package = x) == ''
if (any(idx)) {
warning('package(s) ', paste(x[idx], collapse = ', '), ' not found')
Expand Down

0 comments on commit 7e0d4f6

Please sign in to comment.