runCmd function
Future<ProcessResult>
runCmd(
- ProcessCmd cmd, {
- ShellOptions? options,
- bool? verbose,
- bool? commandVerbose,
- Stream<
List< ? stdin,int> > - StreamSink<
List< ? stdout,int> > - StreamSink<
List< ? stderr,int> >
Command runner
Execute a predefined ProcessCmd command Avoid and prefer Shell instead
if commandVerbose is true, it writes the command line executed preceeded by $ to stdout. It streams
stdout/error if verbose is true.
verbose implies commandVerbose
Implementation
///
/// Execute a predefined ProcessCmd command
/// Avoid and prefer Shell instead
///
/// if [commandVerbose] is true, it writes the command line executed preceeded by $ to stdout. It streams
/// stdout/error if [verbose] is true.
/// [verbose] implies [commandVerbose]
///
Future<ProcessResult> runCmd(
ProcessCmd cmd, {
ShellOptions? options,
bool? verbose,
bool? commandVerbose,
Stream<List<int>>? stdin,
StreamSink<List<int>>? stdout,
StreamSink<List<int>>? stderr,
}) async {
options ??= ShellOptions(
throwOnError: false,
verbose: verbose ?? false,
commandVerbose: commandVerbose ?? verbose,
stderrEncoding: cmd.stderrEncoding,
stdoutEncoding: cmd.stdoutEncoding,
workingDirectory: cmd.workingDirectory,
stdin: stdin,
stdout: stdout,
stderr: stderr,
environment: cmd.environment,
includeParentEnvironment: cmd.includeParentEnvironment,
runInShell: cmd.runInShell,
);
return await processCmdRun(cmd, options: options);
}