Skip to content

Commit

Permalink
Merge pull request #125 from konomae/feature/supports-cocoapods-binary
Browse files Browse the repository at this point in the history
Supports cocoapods-binary
  • Loading branch information
mono0926 authored Dec 28, 2019
2 parents 105df26 + dbda196 commit bf4c5ce
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Sources/LicensePlistCore/LicensePlist.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,18 @@ private func readPodsAcknowledgements(path: URL) -> [String] {
if path.lastPathComponent != Consts.podsDirectoryName {
fatalError("Invalid Pods name: \(path.lastPathComponent)")
}
let path = path.appendingPathComponent("Target Support Files")
if !path.lp.isExists {
Log.warning("not found: \(path)")

let pathsToFind = [
path.appendingPathComponent("Target Support Files"),
path.appendingPathComponent("_Prebuild").appendingPathComponent("Target Support Files")
]

let paths = pathsToFind.filter { $0.lp.isExists }
if paths.isEmpty {
pathsToFind.forEach { Log.warning("not found: \($0)") }
return []
}
let urls = path.lp.listDir()
let urls = paths.flatMap { $0.lp.listDir() }
.filter { $0.lp.isDirectory }
.map { f in
f.lp.listDir()
Expand Down

0 comments on commit bf4c5ce

Please sign in to comment.