Function deno_task_shell::execute_with_pipes

source ·
pub async fn execute_with_pipes(
    list: SequentialList,
    state: ShellState,
    stdin: ShellPipeReader,
    stdout: ShellPipeWriter,
    stderr: ShellPipeWriter
) -> i32
Expand description

Executes a SequentialList of commands with specified input and output pipes.

This function accepts a list of commands, a shell state, and pipes for standard input, output, and error. This function allows the user to retrive the data outputted by the execution and act on it using code. This is made public for the use-case of running tests with shell execution in application depending on the library.

§Arguments

  • list - A SequentialList of commands to execute.
  • state - The current state of the shell, including environment variables and the current directory.
  • stdin - A reader for the standard input stream.
  • stdout - A writer for the standard output stream.
  • stderr - A writer for the standard error stream.

§Returns

The exit code of the command execution.