Skip to content

Commit

Permalink
Merge pull request #21 from minuscorp/patch-1
Browse files Browse the repository at this point in the history
Fix building for Xcode 13 and Swift 5.5
  • Loading branch information
orta committed Sep 28, 2021
2 parents 6e7415d + e9f59db commit 6e7b59d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/PackageConfig/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ enum Package {
let fileManager = FileManager.default

let swiftPMDir = swiftPath.replacingOccurrences(of: "bin/swiftc", with: "lib/swift/pm")
let versions = try! fileManager.contentsOfDirectory(atPath: swiftPMDir).filter { $0 != "llbuild" }
let versions = try! fileManager.contentsOfDirectory(atPath: swiftPMDir)
.filter { $0 != "llbuild" }
.filter { $0.first?.isNumber ?? false }

let latestVersion = versions.sorted().last!
var spmVersionDir = latestVersion
Expand Down

0 comments on commit 6e7b59d

Please sign in to comment.