clone method

  1. @Deprecated('Use clone with options')
Shell clone({
  1. bool? throwOnError,
  2. String? workingDirectory,
  3. @Deprecated('Don\'t change map') Map<String, String>? environment,
  4. @Deprecated('Don\'t change includeParentEnvironment') bool? includeParentEnvironment,
  5. bool? runInShell,
  6. Encoding? stdoutEncoding,
  7. Encoding? stderrEncoding,
  8. Stream<List<int>>? stdin,
  9. StreamSink<List<int>>? stdout,
  10. StreamSink<List<int>>? stderr,
  11. bool? verbose,
  12. bool? commandVerbose,
  13. bool? commentVerbose,
})

Create a new shell

Implementation

@Deprecated('Use clone with options')
Shell clone(
    {bool? throwOnError,
    String? workingDirectory,
    // Don't change environment
    @Deprecated('Don\'t change map') Map<String, String>? environment,

    /// Explicetely set e new environment
//      ShellEnvironment? shellEnvironment,
    @Deprecated('Don\'t change includeParentEnvironment')
    // Don't change includeParentEnvironment
    bool? includeParentEnvironment,
    bool? runInShell,
    Encoding? stdoutEncoding,
    Encoding? stderrEncoding,
    Stream<List<int>>? stdin,
    StreamSink<List<int>>? stdout,
    StreamSink<List<int>>? stderr,
    bool? verbose,
    bool? commandVerbose,
    bool? commentVerbose}) {
  var localShellEnvironment =
      // Compat
      (environment is ShellEnvironment ? environment : null);
  return Shell(
      options: options.clone(
    throwOnError: throwOnError,
    workingDirectory: workingDirectory,
    runInShell: runInShell,
    stdoutEncoding: stdoutEncoding,
    stderrEncoding: stderrEncoding,
    stdin: stdin,
    stderr: stderr,
    stdout: stdout,
    commentVerbose: commentVerbose,
    commandVerbose: commandVerbose,
    shellEnvironment: localShellEnvironment,
    verbose: verbose,
  ));
}