We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b778b4 commit d069f40Copy full SHA for d069f40
AwsClient.scala
@@ -152,13 +152,18 @@ object AwsClient {
152
includeEnvironmentVariables: Boolean = true
153
): AwsClient =
154
initializeWithProperties { key =>
155
- map
156
- .get(key)
157
- .orElse(
158
- if (includeEnvironmentVariables)
159
- then scala.util.Try(System.getenv(key)).toOption
160
- else None
+ scala.util
+ .Try(
+ map
+ .get(key)
+ .orElse(
+ if (includeEnvironmentVariables)
161
+ then scala.util.Try(Option(System.getenv(key))).toOption.flatten
162
+ else None
163
+ )
164
)
165
+ .toOption
166
+ .flatten
167
}
168
169
/** Creates new instance of the AwsClient for the given region using a function to retrieve system properties
0 commit comments