mirror of
https://github.com/xtool-org/xtool.git
synced 2026-11-17 04:51:56 +03:00
comment
This commit is contained in:
@@ -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)'")}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user