make_cli_cmd

Function make_cli_cmd 

Source
pub fn make_cli_cmd(cli_path: &str) -> Command
Expand description

Create a Command for a CLI binary.

On Windows, npm-generated .cmd batch wrappers cannot be reliably spawned via cmd.exe /C when stdio is piped — arguments get dropped, output is lost, and the underlying CLI never executes. Instead, we parse the .cmd file to extract the real entry point and invoke it directly (either node <script> for JS shims or the target .exe directly for native-binary shims).