From 0598f974faa5de597688059db9dcfcb22253d442 Mon Sep 17 00:00:00 2001 From: Konrad Malawski Date: Wed, 8 Jul 2015 15:13:54 +0200 Subject: [PATCH] =pro Fix accessing None in ValidatePullRequest --- project/ValidatePullRequest.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/project/ValidatePullRequest.scala b/project/ValidatePullRequest.scala index 93b7915012..5066fd1f3e 100644 --- a/project/ValidatePullRequest.scala +++ b/project/ValidatePullRequest.scala @@ -106,10 +106,10 @@ object ValidatePullRequest extends AutoPlugin { // if this project depends on a modified module, we must test it deps.nodes.exists { m => - val depends = modifiedModuleIds exists { - _.name == m.id.name - } // match just by name, we'd rather include too much than too little - if (depends) log.info(s"Project [$name] must be verified, because depends on [${modifiedModuleIds.find(_ == m.id).get}]") + // match just by name, we'd rather include too much than too little + val dependsOnModule = modifiedModuleIds find { _.name == m.id.name } + val depends = dependsOnModule.isDefined + if (depends) log.info(s"Project [$name] must be verified, because depends on [$dependsOnModule]") depends } }