From 746ae98f8d809f86f7ced9eec0aad3ee137eebe3 Mon Sep 17 00:00:00 2001 From: Lucas Leblanc <44496264+Dedelweiss@users.noreply.github.com> Date: Mon, 29 May 2023 09:58:11 +0200 Subject: [PATCH] Fix: Correction of the siteRoot path (#17297) - For the first issue, when a user set ./docs to the default value of ScalaSettings, the code only took a value that was not the default `siteRoot.nonDefault`. To fix this, I put a getOrElse to try and get the default value. - For the second problem, I noticed when I cloned the code that the user was calling layouts that did not exist. Be careful with this as it can indeed produce an error. Solving this problem was enough to remove the non-existent layout calls. Fixes: #15306 [Cherry-picked 4e4552e2b950ff832f06768bfe21a68eaa4eee5b] --- scaladoc/src/dotty/tools/scaladoc/Scaladoc.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scaladoc/src/dotty/tools/scaladoc/Scaladoc.scala b/scaladoc/src/dotty/tools/scaladoc/Scaladoc.scala index fa02e87548e6..f8e2ca0c776e 100644 --- a/scaladoc/src/dotty/tools/scaladoc/Scaladoc.scala +++ b/scaladoc/src/dotty/tools/scaladoc/Scaladoc.scala @@ -202,7 +202,7 @@ object Scaladoc: classpath.get, bootclasspath.get, destFile, - siteRoot.nonDefault, + Option(siteRoot.withDefault(siteRoot.default)), projectVersion.nonDefault, projectLogo.nonDefault, projectFooter.nonDefault,