Skip to content

Commit 45d327f

Browse files
authored
[Infra] Fix logic used to find transitive dependencies (#14896)
1 parent fb39382 commit 45d327f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ReleaseTooling/Sources/ZipBuilder/CocoaPodUtils.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,10 @@ enum CocoaPodUtils {
365365
repeat {
366366
var foundDeps = Set<String>()
367367
for dep in newDeps {
368-
let childDeps = installedPods[dep]?.dependencies ?? []
368+
// The `dep` may be a subspec, so get root spec name to lookup it's
369+
// dependencies in the `installedPods` dictionary.
370+
let rootDep = dep.components(separatedBy: "/")[0]
371+
let childDeps = installedPods[rootDep]?.dependencies ?? []
369372
foundDeps.formUnion(Set(childDeps))
370373
}
371374
newDeps = foundDeps.subtracting(returnDeps)

0 commit comments

Comments
 (0)