diff --git a/CHANGELOG.md b/CHANGELOG.md index c96f683..e577b3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,12 @@ +# 0.10.5 (2024-01-16) + +- return the same exit status as rg + # 0.10.4 (2024-01-16) - add `--rga-no-prefix-filenames` flag (https://github.com/phiresky/ripgrep-all/issues/154) -# 0.10.3 (2024-01-16) +# 0.10.3 (2024-01-15) This was originally supposed to be version 1.0.0, but I don't feel confident enough in the stability to call it that. diff --git a/src/bin/rga.rs b/src/bin/rga.rs index 1d8e417..b1ebb82 100644 --- a/src/bin/rga.rs +++ b/src/bin/rga.rs @@ -133,9 +133,12 @@ fn main() -> anyhow::Result<()> { .spawn() .map_err(|e| map_exe_error(e, "rg", "Please make sure you have ripgrep installed."))?; - child.wait()?; + let result = child.wait()?; log::debug!("running rg took {}", print_dur(before)); + if !result.success() { + std::process::exit(result.code().unwrap_or(1)); + } Ok(()) }