Skip to content

Commit 2ba1b51

Browse files
show executable hook paths that fail
1 parent d907500 commit 2ba1b51

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

R/testing.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ run_test <- function(hook_name,
5151
package = "precommit"
5252
), regexp = paste0("/", hook_name))
5353
if (length(path_executable) != 1) {
54-
rlang::abort("Failed to derive hook path")
54+
rlang::abort(c(
55+
"Failed to derive hook path since there are more than one path matching the hook name:",
56+
paste0(path_executable, sep = ",")
57+
))
5558
}
5659
path_candidate <- paste0(testthat::test_path("in", file_name), suffix) %>%
5760
ensure_named(names(file_name), fs::path_file)

0 commit comments

Comments
 (0)