Skip to content

Commit

Permalink
Merge pull request #127 from griffin-stewie/feat/search_package_resol…
Browse files Browse the repository at this point in the history
…ve_in_workspace

try to find Package.resolved located under xcworkspace
  • Loading branch information
mono0926 authored Jan 21, 2020
2 parents 4494e5a + d688723 commit 1e7796f
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 1e7796f

Please sign in to comment.