Get the output when there's an error? #29
Hi! Is it possible to fetch the output (std and err) from when command fails? Thanks :) |
Answered by
rust-shell-script
Jun 8, 2021
Replies: 1 comment 1 reply
My original thought was that if command failed, then the output was not reliable anymore, so it was better to just return error. Do you have a concrete example about such usage ? I guess you can use |
1 reply
Answer selected bygak
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
My original thought was that if command failed, then the output was not reliable anymore, so it was better to just return error. Do you have a concrete example about such usage ?
I guess you can use
spawn!(xxx 2>&1)?.wait_with_pipe(&mut |pipe| {...})for now. In the future, I could add a builtin commandignorefor such cases, similar to rustup install script.