Skip to content

Commit

Permalink
Fix guess_email_address and get_auth_header message
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Apr 5, 2024
1 parent db5ad5a commit 31bd89c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/rc.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,14 @@ guess_email <- function(path = ".", message = TRUE) {
"Using email address {.val {guess}}."
)
}
guess
}

get_auth_header <- function(email) {
valid <- list_validated_emails2(message = FALSE)
if (! email %in% valid$email) {
throw(pkg_error(
"Can't find token for email address {.val {guess}}.",
"Can't find token for email address {.val {email}}.",
i = "Call {.code rhub::rc_new_token()} to get a token."
))
}
Expand Down

0 comments on commit 31bd89c

Please sign in to comment.