Skip to content

Commit

Permalink
try Package.resolved located under xcworkspace
Browse files Browse the repository at this point in the history
Find Package.resolved file under xcworkspace CocoaPods generates if Package.resolved does not exist.
  • Loading branch information
griffin-stewie committed Jan 20, 2020
1 parent 4494e5a commit d688723
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Sources/LicensePlistCore/LicensePlist.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,17 @@ private func readXcodeProject(path: URL) -> String? {
.appendingPathComponent("xcshareddata")
.appendingPathComponent("swiftpm")
.appendingPathComponent("Package.resolved")
return readSwiftPackages(path: packageResolvedPath)
if packageResolvedPath.lp.isExists {
return readSwiftPackages(path: packageResolvedPath)
} else {
let packageResolvedPath = validatedPath
.deletingPathExtension()
.appendingPathExtension("xcworkspace")
.appendingPathComponent("xcshareddata")
.appendingPathComponent("swiftpm")
.appendingPathComponent("Package.resolved")
return readSwiftPackages(path: packageResolvedPath)
}
}

private func readPodsAcknowledgements(path: URL) -> [String] {
Expand Down

0 comments on commit d688723

Please sign in to comment.