From 361a4b4dfaa907c82371f427832ef7f9ddd46e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Lo=CC=81pez?= Date: Fri, 12 Jun 2026 11:58:21 +0200 Subject: [PATCH] Moved XIP expansion to a temporal directory Instead of expanding XIPs on its current directory, a temporal directory is used. The main advantage of this approach is that, because the temporal directory is created on the same volume where Xcode will be installed, the installation is vastly improved if the XIP is on a different volume. - https://nshipster.com/temporary-files/ - The implementation of the `temporalDirectory` function and variable are based on the similar `trashItem`, but without the `@discardableResult` annotation (I cannot think of any case where this URL could to be ignored). This, with PR XcodesOrg/xcodes#179, closes XcodesOrg/xcodes#178. --- Sources/XcodesKit/Shell/XcodesShell.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/XcodesKit/Shell/XcodesShell.swift b/Sources/XcodesKit/Shell/XcodesShell.swift index 878eb64..e86109a 100644 --- a/Sources/XcodesKit/Shell/XcodesShell.swift +++ b/Sources/XcodesKit/Shell/XcodesShell.swift @@ -4,8 +4,8 @@ import Foundation public struct XcodesShell: Sendable { public init() {} - public var unxip: @Sendable (URL) async throws -> ProcessOutput = { - try await XcodesProcess.run(Path.root.usr.bin.xip, workingDirectory: $0.deletingLastPathComponent(), "--expand", $0.path) + public var unxip: @Sendable (URL, URL) async throws -> ProcessOutput = { + try await XcodesProcess.run(Path.root.usr.bin.xip, workingDirectory: $1, "--expand", $0.path) } public var spctlAssess: @Sendable (URL) async throws -> ProcessOutput = { try await XcodesProcess.run(Path.root.usr.sbin.spctl, "--assess", "--verbose", "--type", "execute", $0.path)