diff --git a/plugins/package-managers/pub/src/main/kotlin/Pub.kt b/plugins/package-managers/pub/src/main/kotlin/Pub.kt index 0d4dc3041320d..ab9a5316e2d70 100644 --- a/plugins/package-managers/pub/src/main/kotlin/Pub.kt +++ b/plugins/package-managers/pub/src/main/kotlin/Pub.kt @@ -484,7 +484,7 @@ class Pub( private fun parseProject(definitionFile: File, pubspec: JsonNode, scopes: Set): Project { // See https://dart.dev/tools/pub/pubspec for supported fields. - val rawName = pubspec["name"]?.textValue() ?: definitionFile.parentFile.name + val rawName = pubspec["name"]?.textValue() ?: getFallbackProjectName(analysisRoot, definitionFile) val homepageUrl = pubspec["homepage"].textValueOrEmpty() val repositoryUrl = pubspec["repository"].textValueOrEmpty() val authors = parseAuthors(pubspec)