mirror of
https://github.com/xtool-org/xtool.git
synced 2026-11-17 21:12:01 +03:00
Merge branch 'main' into swift-6-2
This commit is contained in:
@@ -238,7 +238,19 @@ struct SDKBuilder {
|
||||
try await extractXIP(inputPath: inputPath, outDir: devStage.path)
|
||||
}.value
|
||||
try Task.checkCancellation()
|
||||
appDir = devStage.appendingPathComponent("Xcode.app")
|
||||
let contents = try FileManager.default.contentsOfDirectory(
|
||||
at: devStage,
|
||||
includingPropertiesForKeys: nil
|
||||
)
|
||||
let apps = contents.filter { $0.pathExtension == "app" }
|
||||
switch apps.count {
|
||||
case 0:
|
||||
throw Console.Error("Unrecognized xip layout (Xcode.app not found)")
|
||||
case 1:
|
||||
appDir = apps[0]
|
||||
default:
|
||||
throw Console.Error("Unrecognized xip layout (multiple apps found)")
|
||||
}
|
||||
cleanupStageDir = devStage
|
||||
case .app(let appPath):
|
||||
wanted = nil
|
||||
|
||||
Reference in New Issue
Block a user