Skip to content

Commit 0e679fd

Browse files
jpsimMattKiazyk
andcommitted
Log hints about experimental unxip flag when unarchiving
Co-authored-by: Matt Kiazyk <[email protected]>
1 parent 816130a commit 0e679fd

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Sources/XcodesKit/XcodeInstaller.swift

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public final class XcodeInstaller {
8080
/// A numbered step
8181
enum InstallationStep: CustomStringConvertible {
8282
case downloading(version: String, progress: String?, willInstall: Bool)
83-
case unarchiving
83+
case unarchiving(experimentalUnxip: Bool)
8484
case moving(destination: String)
8585
case trashingArchive(archiveName: String)
8686
case checkingSecurity
@@ -103,8 +103,15 @@ public final class XcodeInstaller {
103103
} else {
104104
return "Downloading Xcode \(version)"
105105
}
106-
case .unarchiving:
107-
return "Unarchiving Xcode (This can take a while)"
106+
case .unarchiving(let experimentalUnxip):
107+
let hint = experimentalUnxip ?
108+
"Using experimental unxip. If you encounter any issues, remove the flag and try again" :
109+
"Using regular unxip. Try passing `--experimental-unxip` for a faster unxip process"
110+
return
111+
"""
112+
Unarchiving Xcode (This can take a while)
113+
\(hint)
114+
"""
108115
case .moving(let destination):
109116
return "Moving Xcode to \(destination)"
110117
case .trashingArchive(let archiveName):
@@ -720,7 +727,7 @@ public final class XcodeInstaller {
720727

721728
func unarchiveAndMoveXIP(at source: URL, to destination: URL, experimentalUnxip: Bool) -> Promise<URL> {
722729
return firstly { () -> Promise<Void> in
723-
Current.logging.log(InstallationStep.unarchiving.description)
730+
Current.logging.log(InstallationStep.unarchiving(experimentalUnxip: experimentalUnxip).description)
724731

725732
if experimentalUnxip, #available(macOS 11, *) {
726733
return Promise { seal in

0 commit comments

Comments
 (0)