@@ -342,7 +342,7 @@ public struct Linux: Platform {
342
342
try await fs. mkdir ( atPath: self . swiftlyToolchainsDir ( ctx) )
343
343
}
344
344
345
- await ctx. print ( " Extracting toolchain... " )
345
+ await ctx. message ( " Extracting toolchain... " )
346
346
let toolchainDir = self . swiftlyToolchainsDir ( ctx) / version. name
347
347
348
348
if try await fs. exists ( atPath: toolchainDir) {
@@ -376,7 +376,7 @@ public struct Linux: Platform {
376
376
let tmpDir = self . getTempFilePath ( )
377
377
try await fs. mkdir ( . parents, atPath: tmpDir)
378
378
try await fs. withTemporary ( files: tmpDir) {
379
- await ctx. print ( " Extracting new swiftly... " )
379
+ await ctx. message ( " Extracting new swiftly... " )
380
380
try extractArchive ( atPath: archive) { name in
381
381
// Extract to the temporary directory
382
382
tmpDir / String( name)
@@ -405,15 +405,15 @@ public struct Linux: Platform {
405
405
_ ctx: SwiftlyCoreContext , toolchainFile: ToolchainFile , archive: FilePath , verbose: Bool
406
406
) async throws {
407
407
if verbose {
408
- await ctx. print ( " Downloading toolchain signature... " )
408
+ await ctx. message ( " Downloading toolchain signature... " )
409
409
}
410
410
411
411
let sigFile = self . getTempFilePath ( )
412
412
try await fs. create ( file: sigFile, contents: nil )
413
413
try await fs. withTemporary ( files: sigFile) {
414
414
try await ctx. httpClient. getSwiftToolchainFileSignature ( toolchainFile) . download ( to: sigFile)
415
415
416
- await ctx. print ( " Verifying toolchain signature... " )
416
+ await ctx. message ( " Verifying toolchain signature... " )
417
417
do {
418
418
if let mockedHomeDir = ctx. mockedHomeDir {
419
419
var env = ProcessInfo . processInfo. environment
@@ -432,7 +432,7 @@ public struct Linux: Platform {
432
432
_ ctx: SwiftlyCoreContext , archiveDownloadURL: URL , archive: FilePath , verbose: Bool
433
433
) async throws {
434
434
if verbose {
435
- await ctx. print ( " Downloading swiftly signature... " )
435
+ await ctx. message ( " Downloading swiftly signature... " )
436
436
}
437
437
438
438
let sigFile = self . getTempFilePath ( )
@@ -442,7 +442,7 @@ public struct Linux: Platform {
442
442
url: archiveDownloadURL. appendingPathExtension ( " sig " )
443
443
) . download ( to: sigFile)
444
444
445
- await ctx. print ( " Verifying swiftly signature... " )
445
+ await ctx. message ( " Verifying swiftly signature... " )
446
446
do {
447
447
if let mockedHomeDir = ctx. mockedHomeDir {
448
448
var env = ProcessInfo . processInfo. environment
@@ -461,19 +461,19 @@ public struct Linux: Platform {
461
461
-> PlatformDefinition
462
462
{
463
463
if let platformPretty {
464
- print (
464
+ await ctx . message (
465
465
" \( platformPretty) is not an officially supported platform, but the toolchains for another platform may still work on it. "
466
466
)
467
467
} else {
468
- print (
468
+ await ctx . message (
469
469
" This platform could not be detected, but a toolchain for one of the supported platforms may work on it. "
470
470
)
471
471
}
472
472
473
473
let selections = self . linuxPlatforms. enumerated ( ) . map { " \( $0 + 1 ) ) \( $1. namePretty) " } . joined (
474
474
separator: " \n " )
475
475
476
- print (
476
+ await ctx . message (
477
477
"""
478
478
Please select the platform to use for toolchain downloads:
479
479
@@ -526,7 +526,7 @@ public struct Linux: Platform {
526
526
if disableConfirmation {
527
527
throw SwiftlyError ( message: message)
528
528
} else {
529
- print ( message)
529
+ await ctx . message ( message)
530
530
}
531
531
return await self . manualSelectPlatform ( ctx, platformPretty)
532
532
}
@@ -557,7 +557,7 @@ public struct Linux: Platform {
557
557
if disableConfirmation {
558
558
throw SwiftlyError ( message: message)
559
559
} else {
560
- print ( message)
560
+ await ctx . message ( message)
561
561
}
562
562
return await self . manualSelectPlatform ( ctx, platformPretty)
563
563
}
@@ -568,7 +568,7 @@ public struct Linux: Platform {
568
568
if disableConfirmation {
569
569
throw SwiftlyError ( message: message)
570
570
} else {
571
- print ( message)
571
+ await ctx . message ( message)
572
572
}
573
573
return await self . manualSelectPlatform ( ctx, platformPretty)
574
574
}
@@ -580,7 +580,7 @@ public struct Linux: Platform {
580
580
if disableConfirmation {
581
581
throw SwiftlyError ( message: message)
582
582
} else {
583
- print ( message)
583
+ await ctx . message ( message)
584
584
}
585
585
return await self . manualSelectPlatform ( ctx, platformPretty)
586
586
}
@@ -596,7 +596,7 @@ public struct Linux: Platform {
596
596
if disableConfirmation {
597
597
throw SwiftlyError ( message: message)
598
598
} else {
599
- print ( message)
599
+ await ctx . message ( message)
600
600
}
601
601
return await self . manualSelectPlatform ( ctx, platformPretty)
602
602
}
0 commit comments