Skip to content

Commit 8a9d1cb

Browse files
author
Alexis Lucattini
committed
Make sure that the DESCRIPTION file actually has data inside it.
1 parent 9dee5d8 commit 8a9d1cb

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
@@ -322,6 +322,11 @@ load_pkg_description <- function(path) {
322322
stop("No description at ", path_desc, call. = FALSE)
323323
}
324324

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

0 commit comments

Comments
 (0)