~jan0sch/smederee
Showing details for patch 237919b1f367386f3fca6fa97e0e71f01dd2ba38.
diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala 2025-01-11 15:00:59.346609344 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala 2025-01-11 15:00:59.346609344 +0000 @@ -472,8 +472,14 @@ ) lastTag <- darcs .log(directory.toNIO)(repositoryName.toString)(Chain(s"--from-tag=.", "--to-tag=.", "--xml-output")) - .map(log => scala.xml.XML.loadString(log.stdout.toList.mkString)) - .map(xmlLog => (xmlLog \ "patch").flatMap(VcsRepositoryPatchMetadata.fromDarcsXmlLog).headOption) + .map(log => + if (log.exitValue === 0) { + val xmlLog = scala.xml.XML.loadString(log.stdout.toList.mkString) + (xmlLog \ "patch").flatMap(VcsRepositoryPatchMetadata.fromDarcsXmlLog).headOption + } else { + None + } + ) readmeData <- repo.traverse(repo => doLoadReadme(repo)) readme <- readmeData match { case Some((lines, Some(_), Some(renderableContent))) =>