From 2ba1b51284f51f5db14fb6ffeee49f65c9efcb1a Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sat, 11 Jan 2025 19:07:17 +0100 Subject: [PATCH] show executable hook paths that fail --- R/testing.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/testing.R b/R/testing.R index d50b7afd6..2a7f0ae86 100644 --- a/R/testing.R +++ b/R/testing.R @@ -51,7 +51,10 @@ run_test <- function(hook_name, package = "precommit" ), regexp = paste0("/", hook_name)) if (length(path_executable) != 1) { - rlang::abort("Failed to derive hook path") + rlang::abort(c( + "Failed to derive hook path since there are more than one path matching the hook name:", + paste0(path_executable, sep = ",") + )) } path_candidate <- paste0(testthat::test_path("in", file_name), suffix) %>% ensure_named(names(file_name), fs::path_file)