From 81d11a200c15b73aebe2c1a4f86fc7c7c9a2d78e Mon Sep 17 00:00:00 2001 From: Timo Salmi Date: Wed, 17 Jan 2024 17:12:24 -0500 Subject: [PATCH] fix(pub): Do not rely on the package `name` to be present Signed-off-by: Timo Salmi --- plugins/package-managers/pub/src/main/kotlin/Pub.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/package-managers/pub/src/main/kotlin/Pub.kt b/plugins/package-managers/pub/src/main/kotlin/Pub.kt index ab9a5316e2d7..819538fb5032 100644 --- a/plugins/package-managers/pub/src/main/kotlin/Pub.kt +++ b/plugins/package-managers/pub/src/main/kotlin/Pub.kt @@ -548,7 +548,7 @@ class Pub( pkgInfoFromLockFile["source"].textValueOrEmpty() == "git" -> { val pkgInfoFromYamlFile = readPackageInfoFromCache(pkgInfoFromLockFile, workingDir) - rawName = pkgInfoFromYamlFile["name"].textValue() ?: packageName + rawName = pkgInfoFromYamlFile["name"]?.textValue() ?: packageName description = pkgInfoFromYamlFile["description"].textValueOrEmpty().trim() homepageUrl = pkgInfoFromYamlFile["homepage"].textValueOrEmpty() authors = parseAuthors(pkgInfoFromYamlFile)