Skip to content

Commit

Permalink
return exit status of rg (fixes #139)
Browse files Browse the repository at this point in the history
  • Loading branch information
phiresky committed Jan 16, 2024
1 parent 2fcf565 commit bb505b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
5 changes: 4 additions & 1 deletion src/bin/rga.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}

Expand Down

0 comments on commit bb505b0

Please sign in to comment.