[1.x] Fix missing `project` directory (#8583)

* create `project` directory if extra sbt files are added to the meta-build #8570
This commit is contained in:
azdrojowa123 2026-01-20 16:03:51 +01:00 committed by GitHub
parent d54989915b
commit 16cbaef475
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -1233,9 +1233,12 @@ private[sbt] object Load {
val extraSbtFiles: Seq[File] =
if (isMetaBuildContext(context)) s.get(BasicKeys.extraMetaSbtFiles).getOrElse(Nil)
else Nil
if (hasDefinition(dir) || extraSbtFiles.nonEmpty)
if (hasDefinition(dir) || extraSbtFiles.nonEmpty) {
if (extraSbtFiles.nonEmpty && !dir.exists()) {
IO.createDirectory(dir)
}
buildPlugins(dir, s, enableSbtPlugin(activateGlobalPlugin(config)))
else
} else
noPlugins(dir, config)
}