command-stream 1.3.0

Modern shell command execution library with streaming, async iteration, and event support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use command_stream::{exec, RunOptions};

#[tokio::test]
async fn executes_boolean_and_sequence_operators() {
    let result = exec(
        "false || echo fallback; echo next",
        RunOptions {
            mirror: false,
            ..RunOptions::default()
        },
    )
    .await
    .unwrap();

    assert_eq!(result.stdout, "fallback\nnext\n");
    assert_eq!(result.code, 0);
}