-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Showing
3 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "clap" | ||
version = "2.33.3" | ||
version = "2.33.4" | ||
authors = ["Kevin K. <[email protected]>"] | ||
exclude = ["examples/*", "clap-test/*", "tests/*", "benches/*", "*.png", "clap-perf/*", "*.dot"] | ||
repository = "https://github.com/clap-rs/clap" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters