Skip to content

Commit

Permalink
Clarify error message
Browse files Browse the repository at this point in the history
Co-authored-by: Hadley Wickham <[email protected]>
  • Loading branch information
olivroy and hadley authored Jun 28, 2024
1 parent 1adfb45 commit 0f9db01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/r.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ compute_active_name <- function(path, ext, error_call = caller_env()) {

dir <- path_dir(proj_rel_path(path))
if (!dir %in% c("R", "src", "tests/testthat", "tests/testthat/_snaps")) {
cli::cli_abort("Open file must be a code or test file.", call = error_call)
cli::cli_abort("Open file must be code, test, or snapshot.", call = error_call)
}

file <- path_file(path)
Expand Down

0 comments on commit 0f9db01

Please sign in to comment.