Skip to content

Commit

Permalink
Add extra log about using aria2 if only using urlSession
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKiazyk committed Feb 3, 2022
1 parent 9fa7794 commit cc57f35
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/XcodesKit/XcodeInstaller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,23 @@ public final class XcodeInstaller {
let destination = Path.xcodesApplicationSupport/"Xcode-\(xcode.version).\(xcode.filename.suffix(fromLast: "."))"
switch downloader {
case .aria2(let aria2Path):
if Current.shell.isatty() {
Current.logging.log("Downloading with aria2".green)
// Add 1 extra line as we are overwriting with download progress
Current.logging.log("")
}
return downloadXcodeWithAria2(
xcode,
to: destination,
aria2Path: aria2Path,
progressChanged: progressChanged
)
case .urlSession:
if Current.shell.isatty() {
Current.logging.log("Downloading with urlSession - for faster downloads install aria2 (`brew install aria2`)".black.onYellow)
// Add 1 extra line as we are overwriting with download progress
Current.logging.log("")
}
return downloadXcodeWithURLSession(
xcode,
to: destination,
Expand Down

0 comments on commit cc57f35

Please sign in to comment.