@@ -342,7 +342,7 @@ public struct Linux: Platform {
342342 try await fs. mkdir ( atPath: self . swiftlyToolchainsDir ( ctx) )
343343 }
344344
345- await ctx. print ( " Extracting toolchain... " )
345+ await ctx. message ( " Extracting toolchain... " )
346346 let toolchainDir = self . swiftlyToolchainsDir ( ctx) / version. name
347347
348348 if try await fs. exists ( atPath: toolchainDir) {
@@ -376,7 +376,7 @@ public struct Linux: Platform {
376376 let tmpDir = self . getTempFilePath ( )
377377 try await fs. mkdir ( . parents, atPath: tmpDir)
378378 try await fs. withTemporary ( files: tmpDir) {
379- await ctx. print ( " Extracting new swiftly... " )
379+ await ctx. message ( " Extracting new swiftly... " )
380380 try extractArchive ( atPath: archive) { name in
381381 // Extract to the temporary directory
382382 tmpDir / String( name)
@@ -405,15 +405,15 @@ public struct Linux: Platform {
405405 _ ctx: SwiftlyCoreContext , toolchainFile: ToolchainFile , archive: FilePath , verbose: Bool
406406 ) async throws {
407407 if verbose {
408- await ctx. print ( " Downloading toolchain signature... " )
408+ await ctx. message ( " Downloading toolchain signature... " )
409409 }
410410
411411 let sigFile = self . getTempFilePath ( )
412412 try await fs. create ( file: sigFile, contents: nil )
413413 try await fs. withTemporary ( files: sigFile) {
414414 try await ctx. httpClient. getSwiftToolchainFileSignature ( toolchainFile) . download ( to: sigFile)
415415
416- await ctx. print ( " Verifying toolchain signature... " )
416+ await ctx. message ( " Verifying toolchain signature... " )
417417 do {
418418 if let mockedHomeDir = ctx. mockedHomeDir {
419419 var env = ProcessInfo . processInfo. environment
@@ -432,7 +432,7 @@ public struct Linux: Platform {
432432 _ ctx: SwiftlyCoreContext , archiveDownloadURL: URL , archive: FilePath , verbose: Bool
433433 ) async throws {
434434 if verbose {
435- await ctx. print ( " Downloading swiftly signature... " )
435+ await ctx. message ( " Downloading swiftly signature... " )
436436 }
437437
438438 let sigFile = self . getTempFilePath ( )
@@ -442,7 +442,7 @@ public struct Linux: Platform {
442442 url: archiveDownloadURL. appendingPathExtension ( " sig " )
443443 ) . download ( to: sigFile)
444444
445- await ctx. print ( " Verifying swiftly signature... " )
445+ await ctx. message ( " Verifying swiftly signature... " )
446446 do {
447447 if let mockedHomeDir = ctx. mockedHomeDir {
448448 var env = ProcessInfo . processInfo. environment
@@ -461,19 +461,19 @@ public struct Linux: Platform {
461461 -> PlatformDefinition
462462 {
463463 if let platformPretty {
464- print (
464+ await ctx . message (
465465 " \( platformPretty) is not an officially supported platform, but the toolchains for another platform may still work on it. "
466466 )
467467 } else {
468- print (
468+ await ctx . message (
469469 " This platform could not be detected, but a toolchain for one of the supported platforms may work on it. "
470470 )
471471 }
472472
473473 let selections = self . linuxPlatforms. enumerated ( ) . map { " \( $0 + 1 ) ) \( $1. namePretty) " } . joined (
474474 separator: " \n " )
475475
476- print (
476+ await ctx . message (
477477 """
478478 Please select the platform to use for toolchain downloads:
479479
@@ -526,7 +526,7 @@ public struct Linux: Platform {
526526 if disableConfirmation {
527527 throw SwiftlyError ( message: message)
528528 } else {
529- print ( message)
529+ await ctx . message ( message)
530530 }
531531 return await self . manualSelectPlatform ( ctx, platformPretty)
532532 }
@@ -557,7 +557,7 @@ public struct Linux: Platform {
557557 if disableConfirmation {
558558 throw SwiftlyError ( message: message)
559559 } else {
560- print ( message)
560+ await ctx . message ( message)
561561 }
562562 return await self . manualSelectPlatform ( ctx, platformPretty)
563563 }
@@ -568,7 +568,7 @@ public struct Linux: Platform {
568568 if disableConfirmation {
569569 throw SwiftlyError ( message: message)
570570 } else {
571- print ( message)
571+ await ctx . message ( message)
572572 }
573573 return await self . manualSelectPlatform ( ctx, platformPretty)
574574 }
@@ -580,7 +580,7 @@ public struct Linux: Platform {
580580 if disableConfirmation {
581581 throw SwiftlyError ( message: message)
582582 } else {
583- print ( message)
583+ await ctx . message ( message)
584584 }
585585 return await self . manualSelectPlatform ( ctx, platformPretty)
586586 }
@@ -596,7 +596,7 @@ public struct Linux: Platform {
596596 if disableConfirmation {
597597 throw SwiftlyError ( message: message)
598598 } else {
599- print ( message)
599+ await ctx . message ( message)
600600 }
601601 return await self . manualSelectPlatform ( ctx, platformPretty)
602602 }
0 commit comments