Skip to content

Commit

Permalink
Fix build (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
afsalthaj authored Dec 27, 2019
1 parent ece4dc3 commit 5d61e6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ lazy val root =
.aggregate(zioConfig, zioConfigMagnolia, examples, zioConfigRefined)

lazy val zioConfig =
module("core")
module("zio-config", "core")
.enablePlugins(BuildInfoPlugin)
.settings(buildInfoSettings)
.settings(
Expand All @@ -72,7 +72,7 @@ lazy val zioConfig =
)

lazy val zioConfigRefined =
module("refined")
module("zio-config-refined", "refined")
.settings(
libraryDependencies ++=
Seq(
Expand All @@ -84,7 +84,7 @@ lazy val zioConfigRefined =
)
.dependsOn(zioConfig % "compile->compile;test->test")

lazy val examples = module("examples")
lazy val examples = module("zio-config-examples", "examples")
.settings(
skip in publish := true,
fork := true,
Expand All @@ -95,18 +95,17 @@ lazy val examples = module("examples")
)
.dependsOn(zioConfig, zioConfigMagnolia, zioConfigRefined)

lazy val zioConfigMagnolia = module("magnolia")
.settings(skip in publish := true)
lazy val zioConfigMagnolia = module("zio-config-magnolia", "magnolia")
.settings(
libraryDependencies ++= Seq(
"com.propensive" %% "magnolia" % magnoliaVersion
)
)
.dependsOn(zioConfig)

def module(moduleName: String): Project =
Project(moduleName, file(moduleName))
.settings(stdSettings("zio-config"))
def module(moduleName: String, fileName: String): Project =
Project(moduleName, file(fileName))
.settings(stdSettings(moduleName))
.settings(
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/zio/config/ConfigSource.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ object ConfigSource {
(path: Vector[String]) => {
val key = path.mkString(".")
system
.env(key)
.property(key)
.bimap(ReadError.FatalError(path, _), opt => opt.map(ConfigValue(_, SystemProperties)))
.flatMap(IO.fromOption(_))
.mapError(_ => singleton(ReadError.MissingValue(path)))
Expand Down

0 comments on commit 5d61e6d

Please sign in to comment.