Skip to content

Get the output when there's an error? #29

Answered by rust-shell-script
gak asked this question in Q&A
Discussion options

You must be logged in to vote

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 command ignore for such cases, similar to rustup install script.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gak
Comment options

Answer selected by gak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants