diff --git a/R/outpack_root.R b/R/outpack_root.R index 0c96ffe2..c676f116 100644 --- a/R/outpack_root.R +++ b/R/outpack_root.R @@ -174,9 +174,8 @@ validate_packet_has_file <- function(root, id, path, call = NULL) { } } - vmsg <- cli::cli_vec(squote(msg), list("vec-last" = " or ")) err <- paste("Packet '{id}' does not contain the requested", - "{cli::qty(vmsg)} path{?s} {vmsg}") + "{cli::qty(msg)} path{?s} {.path {msg}}") cli::cli_abort(c(err, set_names(hint, "i")), call = call) } diff --git a/tests/testthat/helper-outpack-server.R b/tests/testthat/helper-outpack-server.R index 3509b309..dcbb35c9 100644 --- a/tests/testthat/helper-outpack-server.R +++ b/tests/testthat/helper-outpack-server.R @@ -1,9 +1,9 @@ outpack_server <- function(path, timeout = 10) { - outpack_server <- Sys.which("outpack_server") + outpack_server <- Sys.which("outpack") if (!nzchar(outpack_server)) { testthat::skip("outpack_server not installed") } - args <- c("--root", path) + args <- c("start-server", "--root", path) px <- processx::process$new(outpack_server, args) withr::defer_parent(px$kill()) diff --git a/tests/testthat/test-outpack-helpers.R b/tests/testthat/test-outpack-helpers.R index 568423f9..191cd13b 100644 --- a/tests/testthat/test-outpack-helpers.R +++ b/tests/testthat/test-outpack-helpers.R @@ -150,7 +150,7 @@ test_that("good error message if file not found in packet", { err <- expect_error( validate_packet_has_file(root, id, c("a.txt", "a.TXT", "d.txt")), - "Packet '.+' does not contain the requested paths\\s*'a.TXT' or 'd.txt'") + "Packet '.+' does not contain the requested paths\\s*'a.TXT' and 'd.txt'") expect_equal( err$body, c(i = "For 'a.TXT' did you mean 'a.txt'",