This commit is contained in:
Kabir Oberai
2025-05-15 23:50:53 +05:30
Unverified
parent 0bb4a286c9
commit 50680fe559
+5
View File
@@ -139,6 +139,11 @@ struct DarwinSDK {
}
static func install(from path: String) async throws {
// we can't just move into ~/.swiftpm/swift-sdks because the swiftpm directory
// location depends on factors like $XDG_CONFIG_HOME. Rather than replicating
// SwiftPM's logic, which may change, it's more reliable to directly invoke
// `swift sdk install`. See: https://github.com/xtool-org/xtool/pull/40
let url = URL(fileURLWithPath: path)
guard DarwinSDK(bundle: url) != nil else { throw Console.Error("Invalid Darwin SDK at '\(path)'")}