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

missing declension in abort message #1399

Closed
corybrunson opened this issue Nov 25, 2024 · 3 comments
Closed

missing declension in abort message #1399

corybrunson opened this issue Nov 25, 2024 · 3 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@corybrunson
Copy link
Contributor

The abort message here does not declense "do" according to the the quantity of offenders, so i prepared a fix here that i'll be glad to PR. Below is an inline demo.

abort_offenders <- function() cli::cli_abort(
  "The following argument{?s} {?was/were} specified but do{?es/} not exist: \\
      {.arg {offenders}}."
)

offenders <- c("one")
abort_offenders()
#> Error in `abort_offenders()`:
#> ! The following argument was specified but does not exist: `one`.

offenders <- c(offenders, "two")
abort_offenders()
#> Error in `abort_offenders()`:
#> ! The following arguments were specified but do not exist: `one` and
#>   `two`.

Created on 2024-11-25 with reprex v2.1.1

@EmilHvitfeldt EmilHvitfeldt added the bug an unexpected problem or unintended behavior label Nov 25, 2024
@EmilHvitfeldt
Copy link
Member

Hallo @corybrunson 👋

good catch! please open a PR, and update the snapshot if available! thanks

@corybrunson
Copy link
Contributor Author

Just noticed that this wasn't closed. Sorry!

Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants