Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Updates package_files to filter empty strings
scan(..., sep = " ") will create empty strings if there are leading whitespaces in the DESCRIPTION file, thus generating an error when trying to apply tokenize_file to unexisting files. Using regular expressions because they are safer than scan
  • Loading branch information
JhossePaul authored Aug 9, 2018
commit 7c5af87ba3d716a91498b499613088156cd305dd
3 changes: 1 addition & 2 deletions R/source.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package_files <- function(path) {

all <- normalizePath(r_files(path))

collate <- scan(text = desc$Collate %||% "", what = "", sep = " ",
quiet = TRUE)
collate <- unlist(strsplit(gsub("'", "", desc$Collate), "\\n\\s*"))

collate <- normalizePath(file.path(path, 'R', collate))

Expand Down