Skip to content

Support exact argv in the Rust streaming runner on Windows #190

Description

@konard

Reproduction

The published Rust crate (command-stream@0.15.0) exposes StreamingRunner::new(command: String). It launches /bin/sh -c on POSIX and cmd.exe /c on Windows. The public command_stream::quote helper emits POSIX single-quote escaping:

assert_eq!(command_stream::quote("hello world"), "'hello world'");

cmd.exe does not treat single quotes as quoting, so a downstream consumer cannot safely preserve an exact executable-plus-argv boundary on Windows through the streaming API. This is especially problematic for arguments containing spaces or shell metacharacters.

Requested interface

Please add an argv-safe streaming constructor/builder accepting an executable and argument vector directly, or provide shell-specific Windows quoting which safely survives the cmd.exe /c layer.

Downstream workaround

link-assistant/formal-ai#990 uses StreamingRunner plus the crate's quoting helper on POSIX and temporarily retains its prior exact-argv std::process::Command runner on Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions