Skip to content

Commit

Permalink
Fix loading configs from paths #234
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Nov 11, 2021
1 parent 063b964 commit d8933b6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ abstract class ConfigSource {
fun fromPaths(paths: List<Path>): ConfigResult<List<ConfigSource>> {
return paths.map { path ->
runCatching { Files.newInputStream(path) }.fold(
{ PathSource(path).valid() },
{ ConfigFailure.UnknownSource(path.toString()).invalid() },
{ PathSource(path).valid() }
)
}.sequence()
.mapInvalid { ConfigFailure.MultipleFailures(it) }
Expand Down

0 comments on commit d8933b6

Please sign in to comment.