Skip to content

Commit f48671b

Browse files
author
Alexis Lucattini
committed
Make sure that the DESCRIPTION file actually has data inside it before reading
1 parent fe551ea commit f48671b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

R/install.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,11 @@ load_pkg_description <- function(path) {
323323
stop("No description at ", path_desc, call. = FALSE)
324324
}
325325

326+
# Check description is not empty
327+
if (file.info(path_desc)$size == 0){
328+
stop("Description filie is empty at ", path_desc, call. = FALSE)
329+
}
330+
326331
desc <- as.list(readDcf(path_desc)[1, ])
327332
names(desc) <- tolower(names(desc))
328333
desc$path <- path

0 commit comments

Comments
 (0)