Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/XcodeVersionManager/Commands/DownloadCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ struct DownloadCommand: AsyncParsableCommand {
}
.sorted { lhs, rhs in
if preferUniversal {
lhs.download.architectures.count > rhs.download.architectures.count
lhs.download.isUniversal && !rhs.download.isUniversal
} else {
lhs.download.architectures.count < rhs.download.architectures.count
!lhs.download.isUniversal && rhs.download.isUniversal
}
}

Expand Down
4 changes: 4 additions & 0 deletions Sources/XcodeVersionManager/Models/XcodeRelease.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ struct XcodeRelease {
struct Download: Equatable {
let architectures: [Architecture]
let url: URL

var isUniversal: Bool {
architectures.count == 2 || architectures.count == 0
}
}

struct Version: Equatable {
Expand Down