[2.x] fix: Create project directory if extra sbt files are added to the meta-build #8570 (#8586)

This commit is contained in:
azdrojowa123
2026-01-20 10:02:58 -05:00
committed by GitHub
parent 6f14de514b
commit 6493707d2f
+5 -2
View File
@@ -1411,9 +1411,12 @@ private[sbt] object Load {
val extraSbtFiles: Seq[VirtualFile] =
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)
}