diff --git a/Xcodes/Backend/Environment.swift b/Xcodes/Backend/Environment.swift index 71a753d..1093aa4 100644 --- a/Xcodes/Backend/Environment.swift +++ b/Xcodes/Backend/Environment.swift @@ -53,7 +53,9 @@ public struct Shell { let stdErrPipe = Pipe() process.standardError = stdErrPipe - var progress = Progress(totalUnitCount: 100) + var progress = Progress() + progress.kind = .file + progress.fileOperationKind = .downloading let observer = NotificationCenter.default.addObserver( forName: .NSFileHandleDataAvailable, diff --git a/Xcodes/Backend/Progress+.swift b/Xcodes/Backend/Progress+.swift index 0998369..61d26e2 100644 --- a/Xcodes/Backend/Progress+.swift +++ b/Xcodes/Backend/Progress+.swift @@ -12,7 +12,6 @@ extension Progress { if let match = regexTotalDownloaded.firstMatch(in: string, options: [], range: range), let matchRange = Range(match.range(at: 0), in: string), let totalDownloaded = Int(string[matchRange].replacingOccurrences(of: "B", with: "")) { - self.fileCompletedCount = totalDownloaded self.completedUnitCount = Int64(totalDownloaded) } @@ -24,7 +23,6 @@ extension Progress { let totalFileSize = Int(string[matchRange].replacingOccurrences(of: "B", with: "")) { if totalFileSize > 0 { - self.fileTotalCount = totalFileSize self.totalUnitCount = Int64(totalFileSize) } }