summaryrefslogtreecommitdiffstats
path: root/CHANGELOG.md
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2019-01-26 14:36:34 -0500
committerAndrew Gallant <jamslam@gmail.com>2019-01-26 14:39:40 -0500
commit31d3e241306f305c1cb94e1882511da2b48dcd36 (patch)
tree9e7ca2b52a93780a20585356ce6cac98ac8db1c2 /CHANGELOG.md
parentbf842dbc7fba45befe9b0d9e28f94336c809c9e3 (diff)
args: prevent panicking in 'rg -h | rg'
Previously, we relied on clap to handle printing either an error message, or --help/--version output, in addition to setting the exit status code. Unfortunately, for --help/--version output, clap was panicking if the write failed, which can happen in fairly common scenarios via a broken pipe error. e.g., `rg -h | head`. We fix this by using clap's "safe" API and doing the printing ourselves. We also set the exit code to `2` when an invalid command has been given. Fixes #1125 and partially addresses #1159
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 616b7466..1c527fa9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,6 +37,9 @@ Bug fixes:
Fix handling of literal slashes in gitignore patterns.
* [BUG #1121](https://github.com/BurntSushi/ripgrep/issues/1121):
Fix bug that was triggering Windows antimalware when using the --files flag.
+* [BUG #1125](https://github.com/BurntSushi/ripgrep/issues/1125),
+ [BUG #1159](https://github.com/BurntSushi/ripgrep/issues/1159):
+ ripgrep shouldn't panic for `rg -h | rg` and should emit correct exit status.
* [BUG #1173](https://github.com/BurntSushi/ripgrep/issues/1173):
Fix handling of `**` patterns in gitignore files.
* [BUG #1174](https://github.com/BurntSushi/ripgrep/issues/1174):