From 5dc008f6fd6bf547ada265726db6d200e4e0a2c8 Mon Sep 17 00:00:00 2001 From: Wes Hinsley Date: Mon, 8 Jul 2024 17:09:04 +0100 Subject: [PATCH] Less info. --- R/root.R | 8 +------- tests/testthat/test-root.R | 4 +--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/R/root.R b/R/root.R index 678051a2..85b7c520 100644 --- a/R/root.R +++ b/R/root.R @@ -25,14 +25,8 @@ ##' hipercow_init(path) hipercow_init <- function(root = ".", driver = NULL, ...) { if ((is.null(driver)) && (length(list(...)) > 0)) { - args <- list(...) cli::cli_alert_warning( - "driver was not specified, but extra args were detected: ") - ul <- cli::cli_ul() - for (arg in names(args)) { - cli::cli_li("{arg} = {args[[arg]]}") - } - cli::cli_end(ul) + "`driver` was not specified, but extra args were detected.") } abs_path <- fs::path_abs(root) norm_path <- fs::path_norm(root) diff --git a/tests/testthat/test-root.R b/tests/testthat/test-root.R index 43ed52f8..f5e9e27f 100644 --- a/tests/testthat/test-root.R +++ b/tests/testthat/test-root.R @@ -146,8 +146,6 @@ test_that("Extraneous args are warned about", { res <- testthat::evaluate_promise( hipercow_init(potato = TRUE, turnip = 42)) ) - expect_length(res$messages, 5) + expect_length(res$messages, 3) expect_match(res$messages[1], "driver was not specified, but") - expect_match(res$messages[2], "potato = TRUE") - expect_match(res$messages[3], "turnip = 42") })