CommandResult
public protocol CommandResult
Represents a running or finished command
-
The command that launched this result
Declaration
Swift
var command: Command { get }
-
Returns true if the command is still running
Declaration
Swift
var isRunning: Bool { get }
-
exitCode()
Default implementationBlock until command is finished, and return exit code
Default Implementation
return exit code asynchronously
Declaration
Swift
func exitCode() -> Int32
-
succeed()
Default implementationBlock and throw an error if exitCode is non-zero
Default Implementation
throw an error if exitCode is non-zero asynchronously
Declaration
Swift
func succeed() throws
-
Sends a signal to a process,
Declaration
Swift
func kill(signal: Int32) throws
-
withSyncContext(f:)
Extension methodUndocumented
Declaration
Swift
func withSyncContext<R>(f: () throws -> R) rethrows -> R
-
finish()
Extension methodWait for the command to finish, ignoring any exit code
Declaration
Swift
@available(macOS 10.15, *) @discardableResult public func finish() async -> Self
-
finish()
Extension methodWait for the command to finish, ignoring any exit code
Declaration
Swift
@discardableResult public func finish() -> Self
-
defaultSucceed(name:)
Extension methodA default implementation that can be used for succeed
Declaration
Swift
public func defaultSucceed(name: String = "\(Self.self)") throws
-
kill()
Extension methodSends a TERM signal to a process,
Declaration
Swift
public func kill() throws