Skip to content

Commit

Permalink
Accept comment + snap
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed May 21, 2024
1 parent fa934ac commit d79316f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,8 @@ read_meta <- function(path, call = caller_env()) {
yaml <- withCallingHandlers(
yaml::yaml.load_file(path, error.label = NULL) %||% list(),
error = function(e) {
cli::cli_abort(c(
"x" = "Could not parse the config file.",
"i" = "Edit {.path {path}} to fix the probkem."
),
cli::cli_abort(
"Could not parse config file at {.path {path}}.",
call = call,
parent = e
)
Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/_snaps/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
as_pkgdown(test_path("assets/bad-yaml"))
Condition
Error in `as_pkgdown()`:
x Could not parse the config file.
i Edit 'assets/bad-yaml/_pkgdown.yml' to fix the probkem.
! Could not parse config file at 'assets/bad-yaml/_pkgdown.yml'.
Caused by error in `yaml.load()`:
! Scanner error: mapping values are not allowed in this context at line 2, column 8

0 comments on commit d79316f

Please sign in to comment.