Skip to content

Commit

Permalink
Renaming variables
Browse files Browse the repository at this point in the history
  • Loading branch information
olivergrabinski committed Apr 12, 2024
1 parent 9187333 commit 4b32621
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ship/src/main/scala/ch/epfl/bluebrain/nexus/ship/RunShip.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ object RunShip {
def s3Ship(client: S3StorageClient, bucket: BucketName) = new RunShip {
override def loadConfig(config: Option[Path]): IO[ShipConfig] = {
config match {
case Some(value) =>
val stream = client.readFile(bucket, FileKey(NonEmptyString.unsafeFrom(value.toString)))
val path = Path("/tmp/ship/s3ship-external.conf")
Files[IO].writeAll(path)(stream).compile.drain.flatMap { _ =>
val configFile = new File(path.toString)
case Some(configPath) =>
val stream = client.readFile(bucket, FileKey(NonEmptyString.unsafeFrom(configPath.toString)))
val tmpPath = Path("/tmp/ship/s3ship-external.conf")
Files[IO].writeAll(tmpPath)(stream).compile.drain.flatMap { _ =>
val configFile = new File(tmpPath.toString)
ShipConfig.loadFromFile(Some(configFile))
}
case None => ShipConfig.load(None)
case None => ShipConfig.load(None)
}

}
Expand Down

0 comments on commit 4b32621

Please sign in to comment.