Skip to content

Commit

Permalink
Catch error
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 committed Apr 15, 2024
1 parent 6739980 commit 99b6423
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -709,13 +709,16 @@ struct FrameworkBuilder {
.appendingPathComponent(frameworkBuildName(name) + ".xcframework")

// The arguments for the frameworks need to be separated.
let frameworkArgs = frameworks.flatMap {
[
"-framework",
let frameworkArgs = frameworks.flatMap { frameworkPath in
do {
// Xcode 15.0-15.2: Return the canonical path to work around issue
// https://forums.swift.org/t/67439
try! $0.resourceValues(forKeys: [.canonicalPathKey]).canonicalPath!,
]
let frameworkCanonicalPath = try frameworkPath.resourceValues(forKeys: [.canonicalPathKey])
.canonicalPath!
return ["-framework", frameworkCanonicalPath]
} catch {
fatalError("Failed to get canonical path for \(frameworkPath): \(error)")
}
}

let outputArgs = ["-output", xcframework.path]
Expand Down

0 comments on commit 99b6423

Please sign in to comment.