Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show missing vignettes in abort message #2121

Merged
merged 4 commits into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# pkgdown (development version)

* If build fails because the index doesn't include all articles, you're now
told what articles are missing (@zkamvar, #2121).

* Restore accidentally nerfed `has_keyword()` and `has_concept()` reference
selectors (#2126).

Expand Down
6 changes: 4 additions & 2 deletions R/build-articles.R
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,10 @@ data_articles_index <- function(pkg = ".") {

if (any(missing)) {
abort(
"Vignettes missing from index: ",
paste(pkg$vignettes$name[missing], collapse = ", ")
paste0(
"Vignettes missing from index: ",
paste(pkg$vignettes$name[missing], collapse = ", ")
)
)
}

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/check.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
check_pkgdown(pkg)
Condition
Error in `data_articles_index()`:
! Vignettes missing from index:
! Vignettes missing from index: articles/nested, width

# informs if everything is ok

Expand Down