sharkdp / hyperfine

A command-line benchmarking tool
Apache License 2.0
20.72k stars 333 forks source link

Bug: correct passing quoted arguments to Windows CMD #678

Closed PedroWitzel closed 9 months ago

PedroWitzel commented 10 months ago

Closes #296

Applied the proposed change to used raw_arg when passing args on the command builder.

Added two tests cases:

  1. to address the original bug
  2. a weird case from the article shared by @rivy, where a \ just before the ending " induces different parsing in different environments.

They were failing before the correction, but now are OK.

N.B.: new rustacean, all inputs are welcomed 😅

sharkdp commented 9 months ago

@PedroWitzel Thank you very much for your contribution!

@rivy Any chance you could take a look at this? You seemed very knowledgeable in this area.. and I personally don't even have a Windows machine. If not, that's also fine of course!