Skip to content

Commit 2e3ae52

Browse files
fix typo in message glue string
Better to construct the glue input separately for a complicated expression with lots of delimiters to avoid this issue
1 parent b0eb54f commit 2e3ae52

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

R/remote.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ users_create_remote <- function(connect, prefix, expect = 1, check = TRUE, exact
4444
if (length(remote_users_res) != expect) {
4545
message(glue::glue("Found {length(remote_users_res)} remote users. Expected {expect}"))
4646
if (length(remote_users_res) > 0) {
47-
message(glue::glue("Users found: {glue::glue_collapse(purrr::map_chr(remote_users_res, ~ .x[['username']]), sep = \", \")}"))
47+
user_str <- toString(purrr::map_chr(remote_users_res, ~ .x[["username"]]))
48+
message(glue::glue("Users found: {user_str}"))
4849
}
4950
stop("The expected user(s) were not found. Please specify a more accurate 'prefix'")
5051
}
@@ -88,7 +89,8 @@ groups_create_remote <- function(connect, prefix, expect = 1, check = TRUE) {
8889
if (remote_groups$total != expect) {
8990
message(glue::glue("Found {remote_groups$total} remote groups. Expected {expect}"))
9091
if (remote_groups$total > 0) {
91-
message(glue::glue("Groups found: {glue::glue_collapse(purrr::map_chr(remote_groups$results, ~ .x$name), sep = \", \")"))
92+
group_str <- toString(purrr::map_chr(remote_groups$results, ~ .x[["name"]]))
93+
message(glue::glue("Groups found: {group_str}"))
9294
}
9395
stop("The expected group(s) were not found. Please specify a more accurate 'prefix'")
9496
}

0 commit comments

Comments
 (0)