diff --git a/plugins/kotlin/util/project-model-updater/src/org/jetbrains/tools/model/updater/Main.kt b/plugins/kotlin/util/project-model-updater/src/org/jetbrains/tools/model/updater/Main.kt index ed403bf1e731..61d4f6e80736 100644 --- a/plugins/kotlin/util/project-model-updater/src/org/jetbrains/tools/model/updater/Main.kt +++ b/plugins/kotlin/util/project-model-updater/src/org/jetbrains/tools/model/updater/Main.kt @@ -67,7 +67,8 @@ fun main(args: Array) { } val monorepoRoot = communityRoot.parent.takeIf { - it.resolve(".idea").isDirectory() + // The community name check is required since the community might be placed directly inside another repo (e.g., kotlin) + it.resolve(".idea").isDirectory() && it.resolve("community").isDirectory() } val resolverSettings = readJpsResolverSettings(communityRoot, monorepoRoot)