diff --git a/Sources/TSCBasic/Process.swift b/Sources/TSCBasic/Process.swift index 6242106f..f2dac50f 100644 --- a/Sources/TSCBasic/Process.swift +++ b/Sources/TSCBasic/Process.swift @@ -976,7 +976,7 @@ extension Process { /// - environment: The environment to pass to subprocess. By default the current process environment /// will be inherited. /// - loggingHandler: Handler for logging messages - @available(macOS 10.15, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) static public func popen( arguments: [String], environment: [String: String] = ProcessEnv.vars, @@ -999,7 +999,7 @@ extension Process { /// - environment: The environment to pass to subprocess. By default the current process environment /// will be inherited. /// - loggingHandler: Handler for logging messages - @available(macOS 10.15, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) static public func popen( args: String..., environment: [String: String] = ProcessEnv.vars, @@ -1016,7 +1016,7 @@ extension Process { /// will be inherited. /// - loggingHandler: Handler for logging messages /// - Returns: The process output (stdout + stderr). - @available(macOS 10.15, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @discardableResult static public func checkNonZeroExit( arguments: [String], @@ -1039,7 +1039,7 @@ extension Process { /// will be inherited. /// - loggingHandler: Handler for logging messages /// - Returns: The process output (stdout + stderr). - @available(macOS 10.15, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @discardableResult static public func checkNonZeroExit( args: String..., diff --git a/Tests/TSCBasicTests/ProcessTests.swift b/Tests/TSCBasicTests/ProcessTests.swift index 7ffc680d..fefcbb9f 100644 --- a/Tests/TSCBasicTests/ProcessTests.swift +++ b/Tests/TSCBasicTests/ProcessTests.swift @@ -89,6 +89,7 @@ class ProcessTests: XCTestCase { } } + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) func testPopenAsync() async throws { #if os(Windows) let args = ["where.exe", "where"] @@ -122,6 +123,7 @@ class ProcessTests: XCTestCase { } } + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) func testCheckNonZeroExitAsync() async throws { do { let output = try await Process.checkNonZeroExit(args: "echo", "hello") @@ -344,6 +346,7 @@ class ProcessTests: XCTestCase { } } + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) func testStdoutStdErrAsync() async throws { // A simple script to check that stdout and stderr are captured separatly. do { @@ -490,6 +493,7 @@ fileprivate extension Process { return try checkNonZeroExit(args: script(scriptName), environment: environment, loggingHandler: loggingHandler) } + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) static func checkNonZeroExit( scriptName: String, environment: [String: String] = ProcessEnv.vars, @@ -510,6 +514,7 @@ fileprivate extension Process { return try popen(arguments: [script(scriptName)], environment: Self.env(), loggingHandler: loggingHandler) } + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @discardableResult static func popen( scriptName: String,