Skip to content

Commit

Permalink
give option to revert to prev behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
jburos committed Oct 26, 2023
1 parent f60bdbb commit adeffc7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions R/geco_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,15 @@ geco_api_url <- function(..., project = NULL, project_version_id = NULL, run_id=
login <- function(user, password, host) {
url <- .get_url(host)
if (missing(password) || missing(user)) {
# get credentials from keyring
creds <- .get_credentials(host = host, user = user)
user = creds[1]
password = creds[2]
if (!is.null(Sys.getenv('GECO_API_NO_KEYRING', unset = NULL))) {
user <- Sys.getenv('GECO_API_USER')
password <- Sys.getenv('GECO_API_PASSWORD')
} else {
# get credentials from keyring
creds <- .get_credentials(host = host, user = user)
user = creds[1]
password = creds[2]
}
}
if (is.null(user)) {
cli::cli_inform('Note: credential storage has changed; please run `configure()` to migrate to the new storage.')
Expand Down

0 comments on commit adeffc7

Please sign in to comment.