We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e80b7d commit bf05726Copy full SHA for bf05726
1 file changed
Sources/XToolSupport/SDKBuilder.swift
@@ -238,7 +238,19 @@ struct SDKBuilder {
238
try await extractXIP(inputPath: inputPath, outDir: devStage.path)
239
}.value
240
try Task.checkCancellation()
241
- appDir = devStage.appendingPathComponent("Xcode.app")
+ let contents = try FileManager.default.contentsOfDirectory(
242
+ at: devStage,
243
+ includingPropertiesForKeys: nil
244
+ )
245
+ let apps = contents.filter { $0.pathExtension == "app" }
246
+ switch apps.count {
247
+ case 0:
248
+ throw Console.Error("Unrecognized xip layout (Xcode.app not found)")
249
+ case 1:
250
+ appDir = apps[0]
251
+ default:
252
+ throw Console.Error("Unrecognized xip layout (multiple apps found)")
253
+ }
254
cleanupStageDir = devStage
255
case .app(let appPath):
256
wanted = nil
0 commit comments