Skip to content

Commit

Permalink
Less info.
Browse files Browse the repository at this point in the history
  • Loading branch information
weshinsley committed Jul 8, 2024
1 parent a8508ea commit 5dc008f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 1 addition & 7 deletions R/root.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions tests/testthat/test-root.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})

0 comments on commit 5dc008f

Please sign in to comment.