Skip to content

Commit 232152f

Browse files
Add check for proof folder existing when publishing an issue
1 parent 444edfd commit 232152f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R/publish.R

+4
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ publish_issue <- function(issue, home = get_articles_path(), republish_all = FAL
189189
issue_num <- as.integer(sub(issue_regex, "\\2", issue))
190190
issue_month <- issue_month(issue)
191191

192+
if(!dir.exists(issue_dir)) {
193+
abort("The proofed issue could not be found, have you set the appropriate articles path with set_articles_path()?")
194+
}
195+
192196
## Handle articles
193197
issue_arts <- dir(issue_dir, pattern = "^\\d{4}-\\d{2,3}$", full.names = TRUE)
194198
arts <- lapply(file.path(issue_arts, "DESCRIPTION"), as.article)

0 commit comments

Comments
 (0)