Skip to content

Commit

Permalink
Merge pull request #121 from plietar/who-gives-a-fuck-about-an-oxford…
Browse files Browse the repository at this point in the history
…-comma

Fix CI issue caused by new cli and outpack versions.
  • Loading branch information
richfitz authored Jan 22, 2024
2 parents 1f1adc4 + d70a1dc commit 6376b79
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions R/outpack_root.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/helper-outpack-server.R
Original file line number Diff line number Diff line change
@@ -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())

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-outpack-helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
Expand Down

0 comments on commit 6376b79

Please sign in to comment.