def locateBuildInfo()

in app/services/ZipReader.scala [100:114]


  def locateBuildInfo(maybeAwsAccount:Option[String], maybeRegion:Option[String]) = locateBuildInfoContent().map(_.map(bytes=>{
    import models.DockerImageDecoder._
    parser
      .parse(bytes.utf8String)
      .flatMap(_.as[BuildInfo]) match {
      case err@Left(parseErr)=>
        logger.error(s"Parsing error: $parseErr. Incoming data was: ${bytes.utf8String}")
        err
      case Right(result)=>
        (maybeAwsAccount, maybeRegion) match {
          case (Some(awsAcct), Some(region))=>Right(result.fixedUpAwsImage(awsAcct, region))
          case (_, _)=>Right(result)
        }
    }
  }))