RunOutput
public final class RunOutput
Output from a run command.
-
The error from running the command, if any.
Declaration
Swift
public private(set) var error: CommandError? -
Standard output, trimmed of whitespace and newline if it is single-line.
Declaration
Swift
public private(set) lazy var stdout: String = -
Standard error, trimmed of whitespace and newline if it is single-line.
Declaration
Swift
public private(set) lazy var stderror: String = -
The exit code of the command. Anything but 0 means there was an error.
Declaration
Swift
public var exitcode: Int -
Checks if the exit code is 0.
Declaration
Swift
public var succeeded: Bool -
Runs the first command, then the second one only if the first succeeded.
Declaration
Swift
public static func && (lhs: RunOutput, rhs: @autoclosure () -> RunOutput) -> RunOutputReturn Value
the result of the second one if it was run, otherwise the first one.
-
Runs the first command, then the second one only if the first failed.
Declaration
Swift
public static func || (lhs: RunOutput, rhs: @autoclosure () -> RunOutput) -> RunOutputReturn Value
the result of the second one if it was run, otherwise the first one.
View on GitHub
RunOutput Class Reference