Skip to content

Support argv-safe Windows command shims in JavaScript shell mode #191

Description

@konard

Reproduction

The JavaScript package's exact-argv mode is ideal for native executables:

new ProcessRunner({ mode: "exec", file, args })

On Windows, command shims such as VS Code's code.cmd require a shell. The shell spec accepts only a completed command string:

new ProcessRunner({ mode: "shell", command })

There is no supported executable-plus-args form that delegates Windows command-line construction to Node. The exported quote() helper uses POSIX single quotes, which cmd.exe does not recognize, so consumers cannot safely assemble arbitrary arguments themselves.

Requested interface

Please support { mode: "shell", file, args } with platform-correct argument handling, or expose a Windows-safe command builder for the cmd.exe shell path.

Downstream workaround

link-assistant/formal-ai#990 routes asynchronous native executable boundaries through command-stream, but temporarily retains child_process.spawn(file, args, { shell: true }) for its Windows-only code.cmd --install-extension ... boundary.

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