Skip to content

Commit

Permalink
close parenthesis and correct app
Browse files Browse the repository at this point in the history
  • Loading branch information
vortexing committed Apr 16, 2020
1 parent 971169c commit 9fb3f5a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/setCreds.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ setCreds <- function(path, tokenSet="file") {
Sys.setenv(TGR=Sys.getenv("TGRAPPTOKEN"))
Sys.setenv(S3A=Sys.getenv("PAGAACCESS2"))
Sys.setenv(S3SA=Sys.getenv("PAGASECRET2"))
Sys.setenv(AWS_ACCESS_KEY_ID=Sys.getenv("PAGAACCESS2"))
Sys.setenv(AWS_SECRET_ACCESS_KEY=Sys.getenv("PAGASECRET2"))
}
Sys.setenv(REDURI="https://cdsweb07.fhcrc.org/redcap/api/")
if ("" %in% Sys.getenv(c("AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"))) {
# if the person is still using the old set of creds, repurpose them
Sys.setenv(AWS_ACCESS_KEY_ID = Sys.getenv("S3A"),
AWS_SECRET_ACCESS_KEY = Sys.getenv("S3SA")}
Sys.setenv(AWS_ACCESS_KEY_ID= Sys.getenv("S3A"),
AWS_SECRET_ACCESS_KEY = Sys.getenv("S3SA"))
}
Sys.setenv(AWS_DEFAULT_REGION = "us-west-2")
if ("" %in% Sys.getenv(c("REDURI", "TGR", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_DEFAULT_REGION"))) {
stop("You have missing environment variables. Please set env vars.")} else message("Credentials set successfully.")
Expand Down

0 comments on commit 9fb3f5a

Please sign in to comment.