Skip to content

Commit

Permalink
malformed URL? on Mac?
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotmcintire committed Aug 6, 2024
1 parent baebee3 commit 7c723de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/Require-helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,11 @@ rmEmptyFiles <- function(files, minSize = 100) {


GETWauthThenNonAuth <- function(url, token, verbose = getOption("Require.verbose")) {
a <- httr::GET(url, httr::add_headers(Authorization = token))
if (is.null(token)) {
a <- httr::GET(url)
} else {
a <- httr::GET(url, httr::add_headers(Authorization = token))
}
if (grepl("Bad credentials", a) || grepl("404", httr::http_status(a)$message)) {
if (grepl("Bad credentials", a)) messageVerbose(red("Git credentials do not work for this url: ", url,
"\nAre they expired?"), verbose = verbose)
Expand Down

0 comments on commit 7c723de

Please sign in to comment.