Skip to content

Commit

Permalink
Use getOrElse to unwrap optional credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
pnc committed Aug 1, 2017
1 parent 45c0266 commit 11f5988
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/s3/website/model/Config.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ object Config {
session_token <- config.session_token
} yield new AWSStaticCredentialsProvider(new BasicSessionCredentials(s3_id, s3_secret, session_token))
}
new AWSCredentialsProviderChain(List(credentialsFromConfigFile, Some(new DefaultAWSCredentialsProviderChain)).flatten)
credentialsFromConfigFile getOrElse new DefaultAWSCredentialsProviderChain
}

def loadOptionalBooleanOrStringSeq(key: String)(implicit unsafeYaml: UnsafeYaml): Either[ErrorReport, Option[Either[Boolean, Seq[String]]]] = {
Expand Down

0 comments on commit 11f5988

Please sign in to comment.