Skip to content

Commit

Permalink
fix issue with potential nullable repo tags
Browse files Browse the repository at this point in the history
  • Loading branch information
viktortnk committed Oct 11, 2016
1 parent 2acc2a3 commit 44ff5ac
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,13 @@ class DockerJavaExecutor(override val host: String, client: DockerClient)
}

override def listImages()(implicit ec: ExecutionContext): Future[Set[String]] = {
Future(client.listImagesCmd().exec().asScala.flatMap(_.getRepoTags).toSet)
Future(
client
.listImagesCmd()
.exec()
.asScala
.flatMap(img => Option(img.getRepoTags).getOrElse(Array()))
.toSet)
}

override def pullImage(image: String)(implicit ec: ExecutionContext): Future[Unit] = {
Expand Down

0 comments on commit 44ff5ac

Please sign in to comment.