Skip to content

Commit cc57f35

Browse files
committed
Add extra log about using aria2 if only using urlSession
1 parent 9fa7794 commit cc57f35

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Sources/XcodesKit/XcodeInstaller.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,13 +463,23 @@ public final class XcodeInstaller {
463463
let destination = Path.xcodesApplicationSupport/"Xcode-\(xcode.version).\(xcode.filename.suffix(fromLast: "."))"
464464
switch downloader {
465465
case .aria2(let aria2Path):
466+
if Current.shell.isatty() {
467+
Current.logging.log("Downloading with aria2".green)
468+
// Add 1 extra line as we are overwriting with download progress
469+
Current.logging.log("")
470+
}
466471
return downloadXcodeWithAria2(
467472
xcode,
468473
to: destination,
469474
aria2Path: aria2Path,
470475
progressChanged: progressChanged
471476
)
472477
case .urlSession:
478+
if Current.shell.isatty() {
479+
Current.logging.log("Downloading with urlSession - for faster downloads install aria2 (`brew install aria2`)".black.onYellow)
480+
// Add 1 extra line as we are overwriting with download progress
481+
Current.logging.log("")
482+
}
473483
return downloadXcodeWithURLSession(
474484
xcode,
475485
to: destination,

0 commit comments

Comments
 (0)