diff --git a/Sources/Merge/Intramodular/Console/_StandardOutputRewriter.swift b/Sources/Merge/Intramodular/Console/_StandardOutputRewriter.swift index 8879cbd..3236a9e 100644 --- a/Sources/Merge/Intramodular/Console/_StandardOutputRewriter.swift +++ b/Sources/Merge/Intramodular/Console/_StandardOutputRewriter.swift @@ -6,12 +6,12 @@ import Darwin import Foundation import Swift -public class _StandardOutputRewriter { +public class _StandardOutputRewriter: @unchecked Sendable { private var originalSTDOUTDescriptor: Int32 = -1 private var originalSTDERRDescriptor: Int32 = -1 private let stdoutPipe: Pipe = Pipe() private let stderrPipe: Pipe = Pipe() - private let modifyLine: (String) -> String? + private let modifyLine: @Sendable (String) -> String? private var stdoutBuffer = Data() private var stderrBuffer = Data() @@ -21,7 +21,9 @@ public class _StandardOutputRewriter { private var stopContinuation: CheckedContinuation? private let hasRunLoop: Bool - public init(modifyLine: @escaping (String) -> String?) { + public init( + modifyLine: @escaping @Sendable (String) -> String? + ) { self.modifyLine = modifyLine self.hasRunLoop = _StandardOutputRewriter.checkRunLoopAvailability() diff --git a/Sources/ShellScripting/Intramodular/Process+sh.swift b/Sources/ShellScripting/Intramodular/Process+sh.swift index fe00d81..f783f68 100644 --- a/Sources/ShellScripting/Intramodular/Process+sh.swift +++ b/Sources/ShellScripting/Intramodular/Process+sh.swift @@ -173,6 +173,7 @@ public func shq( ._runAsynchronouslyRedirectingAllOutput(to: sink) } +@available(*, deprecated) @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) public func sh( _ cmd: String, @@ -184,6 +185,7 @@ public func sh( return try shq(cmd, environment: environment, workingDirectory: workingDirectory) } +@available(*, deprecated) @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) public func sh( _ cmd: String, @@ -195,6 +197,7 @@ public func sh( return try await shq(cmd, environment: environment, workingDirectory: workingDirectory) } +@available(*, deprecated) @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) public func sh( command: String, @@ -208,6 +211,7 @@ public func sh( ) } +@available(*, deprecated) @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) public func sh( _ sink: Process.StandardOutputSink, @@ -223,6 +227,7 @@ public func sh( ) } +@available(*, deprecated) @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) public func sh( _ cmd: String, @@ -238,6 +243,7 @@ public func sh( ) } +@available(*, deprecated) @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) public func sh( _ type: D.Type, @@ -257,6 +263,7 @@ public func sh( ) } +@available(*, deprecated) @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) public func sh( _ type: D.Type, @@ -276,6 +283,7 @@ public func sh( ) } +@available(*, deprecated) @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) public func sh( _ sink: Process.StandardOutputSink,