Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(panic): swallows broken pipe errors
We were unwrapping an `Err` from the `write!` calls, of which things like `BrokenPipe` can happen when the write end of a pipe is closed. Because we were exit'ing the process anyways at the time the `panic` was occurring, we are now just swallowing the error. Changing this API to bubble up the result would be a breaking change. Another approach would be to try and write to stdout, if that fails due to a broken pipe then use stderr. However, that would change the semantics in what could be argued is a breaking change. Simply dropping the error, can always be changed to this "use stderr if stdout is closed" approach later if desired. For a great explanation of the types of errors see the README in `calm_io`: https://github.com/myrrlyn/calm_io/blob/a42845575a04cd8b65e92c19d104627f5fcad3d7/README.md
- Loading branch information