Windows pipeline capture

I am trying to capture stdout/stderr of a windows command. However, it does not seem to work:

run(pipeline(`cmd /C nonexisting.exe`; stderr=devnull, stdout=devnull))


 [1] pipeline_error
   @ .\process.jl:565 [inlined]
 [2] run(::Base.CmdRedirect; wait::Bool)
   @ Base .\process.jl:480
 [3] run(::Base.CmdRedirect)
   @ Base .\process.jl:477
 [4] top-level scope
   @ REPL[18]:1

I don’t have a Windows system to try this out on, but what do you get when you run the example from the documentation? (note: link not provided because I thought you didn’t read it, just provided to save someone some typing if they wanted a link to it)

readchomp(`cmd /C echo hello`)

The problem was caused by wait=true. When false works as expected.