Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class ScalaSettings extends Settings.SettingGroup {
"-project",
"project title",
"The name of the project",
sys.props("user.dir").split(File.separatorChar).last
""
)

val projectVersion = StringSetting (
Expand Down
4 changes: 3 additions & 1 deletion doc-tool/src/dotty/tools/dottydoc/DocDriver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ class DocDriver extends Driver {
val projectVersion = ctx.settings.projectVersion.value
val projectUrl = ctx.settings.projectUrl.value

if (!siteRoot.exists || !siteRoot.isDirectory)
if (projectName.isEmpty)
ctx.error(s"Site project name not set. Use `-project <title>` to set the project name")
else if (!siteRoot.exists || !siteRoot.isDirectory)
ctx.error(s"Site root does not exist: $siteRoot")
else {
Site(siteRoot, projectName, projectVersion, projectUrl, ctx.docbase.packages)
Expand Down