Skip to content

Commit 18578b3

Browse files
authored
Merge pull request #9756 from dotty-staging/dottydoc-root
Fix #8769: change dottydoc root to docs/ subdirectory
2 parents 825cdd0 + 30d3d0b commit 18578b3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ class ScalaSettings extends Settings.SettingGroup {
187187
"-siteroot",
188188
"site root",
189189
"A directory containing static files from which to generate documentation.",
190-
sys.props("user.dir")
190+
"./docs"
191191
)
192192

193193

doc-tool/src/dotty/tools/dottydoc/DocDriver.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ class DocDriver extends Driver {
5656

5757
if (projectName.isEmpty)
5858
report.error(s"Site project name not set. Use `-project <title>` to set the project name")
59-
else if (!siteRoot.exists || !siteRoot.isDirectory)
60-
report.error(s"Site root does not exist: $siteRoot")
59+
else if (!siteRoot.exists)
60+
report.echo(s"Site root (`-siteroot`) does not exist: $siteRoot, no documentation will be generated.")
61+
else if (!siteRoot.isDirectory)
62+
report.error(s"Site root (`-siteroot`) is not a directory: $siteRoot")
6163
else {
6264
def generateSite(outDir: File, baseUrl: String) =
6365
Site(siteRoot, outDir, projectName, projectVersion, projectUrl, projectLogo, ctx.docbase.packages, baseUrl)

0 commit comments

Comments
 (0)