ExternalCommand
public class ExternalCommand : Command, CustomStringConvertible
Represents an external program invocation. It is the lowest-level command, that will spawn a subprocess when run.
-
The environment variables the command will be launched with
Declaration
Swift
public let environment: [String : String]
-
Declaration
Swift
public let description: String
-
like “set -x”, this will cause all external commands to print themselves when they run
Declaration
Swift
public static var verbose: Bool
-
Creates the command, but does not run it
Declaration
Swift
public init(_ command: String, arguments: [String], addEnv: [String : String] = [:])
Parameters
command
The executable to run
arguments
The command line arguments to pass. No substitution is performed
addEnv
Additional environment variable that will be passed in addition to the swsh process’s environment
-
Declaration
Swift
public func coreAsync(fdMap: FDMap) -> CommandResult